Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed ArcGIS 10.1 yesterday (Windows 7 64-bit), but have a separate Python 2.7 installation. Now my gdal does not work correctly anymore. It looks like all commands without the ending "*.py" work fine -- e.g. gdal_rasterize, but all gdal commands with the ending "'.py" give me the following error:

Convert  C:\Users\max\icechart_minimum198403_201303.tif  to shapefile.
Traceback (most recent call last):
File "C:\Program Files\GDAL\", line 34, in <module>
 import gdal, ogr, osr
ImportError: No module named gdal

I checked all the variables, even the Registry entries as described here and the Environment path has C:\Program Files\GDAL at the first position and GDAL_DATA is C:\Program Files\GDAL\gdal-data ...

By the way, within Python I type "import gdal" and it is imported without any problem ...

This all seems right ... any advice on what could be missing / wrong, someone having run into the same problem ?

share|improve this question
This does not look like a duplicate but may reassure you that what you are trying to do is likely to be possible:…. It may be worth editing your Question to record the version of ArcGIS for Desktop that you installed. – PolyGeo May 21 '14 at 10:44
I just see that my other Windows 7 computer had Python 2.7 and that I had installed ArcGIS there, somehow this was no issue there... so maybe ArcGIS has little to do here and the main question seems, why is gdal not finding import gdal in its own scripts ... – Max May 21 '14 at 10:49
How are you calling the gdal python script? Does it work if you manually call it through the proper Python installation (not the ArcGIS one)? – Evil Genius May 21 '14 at 10:51
yes -- if I call "import gdal" from Python (not via ArcGIS) , it imports without error. Only the command line gives the message above. That one cannot import gdal ... which seems strange ... – Max May 21 '14 at 10:53
You may have multiple python installs, ArcGis has it's own special version in C:\Python27\ArcGIS10.1 (usually). It is possible that the lib is installed in a location that it can't find. You might need to do sys.path.append(location of GDAL) before you import. This has fixed this problem for me previously, but that was in 9.3. – Michael Miles-Stimson May 21 '14 at 23:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.