I've been trying to install GDAL for a month now in PyCharm. I use PyCharm, I like it, and I'm not switching to/adding Anaconda.

I keep getting the following error (screenshot below) on any GDAL or osgeo-related install. My pip is there and up to date, v. 18.1. Screenshot below of confirming this in command line.

enter image description here

enter image description here

  • Thanks @Luke...I got it installed via command prompt, so I can't reproduce the error message to copy/paste instead of screenshot. For some reason I have a "C:\Python27\ArcGIS10.6" folder and a "C:\Python27\ArcGISx6410.6" folder, and something was wrong with the pip in one of them. So, I got gdal installed, but I installed it into the Arc folders in C:\Python27, so I probably broke my arcgis :-| I assume I will know when I messed it up because running a script calling arcpy will crash? A clean re-install of arcgis should fix it? – AlexS1 Nov 14 '18 at 23:14
  • @Luke, related question, but I can write it up as a separate question if that is preferred. I'm writing scripts in Python, and some of them I am turning into "tools" in ArcGIS to pass along to others on my team that don't use Python or any coding. My questions are [1] what is the best structure for my "C:\Python27" folder for handling ArcGIS and any additional libraries (e.g., GDAL); and [2] should everyone else on my team have the same folder structure I do to ensure they can run the script tools? – AlexS1 Nov 14 '18 at 23:26
  • GDAL requires a specific version of numpy, as does ArcMap. Unfortunately (at least on 10.3) the versions they each require are different, so installing GDAL breaks ArcMap. You say you're not switching to Anaconda, but if you need to use GDAL it's all but necessary to do so in a separate Python environment from Arc's, which is exactly what Anaconda will allow you to achieve. – mikewatt Nov 15 '18 at 1:12
  • FWIW, I have GDAL installed in my Arc10.6 python libraries, and nothing has broken yet. Does pandas have the same issue? I've had it installed for a while in the Arc python libraries, and it doesn't seem to have updated numpy – AlexS1 Nov 15 '18 at 17:27
  • Not sure about pandas, I don't really use it. I did get gdal to install into 10.3 back when I attempted it, but it would give me a numpy-related error when calling certain functions (like band.ReadAsArray() I think?). But maybe 10.6 is indeed compatible – mikewatt Nov 15 '18 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.