Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Trying to import gdal for Python 2.7.3 on Windows XP:

>>> import gdal
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\site-packages\gdal.py", line 2, in <module>
    from osgeo.gdal import deprecation_warn
  File "C:\Python27\lib\site-packages\osgeo\__init__.py", line 21, in <mo
    _gdal = swig_import_helper()
  File "C:\Python27\lib\site-packages\osgeo\__init__.py", line 17, in swit_helper
  _mod = imp.load_module('_gdal', fp, pathname, description)
ImportError: DLL load failed: The specified procedure could not be found.

Following suggestions from How to install GDAL with Python on windows? and elsewhere, here's what I've done so far:

The result is the same. Any other ideas about how to troubleshoot this?

share|improve this question
Did you install Python using OSGeo4W? –  Nathan W Dec 31 '12 at 5:41
gdal19.dll is not in your path. Edit the environment variable and try again. Also, you should use the import: from osgeo import gdal. –  kyle Dec 31 '12 at 15:43
@NathanW I had not - I installed 2.7.2 and tried again - no change. –  meetar Dec 31 '12 at 16:26
@kyle gdal19.dll is in C:\OSGeo4W\bin which is in my path, and the result is the same when I try from osgeo. –  meetar Dec 31 '12 at 16:28
Are you sure the versions match up for your python bindings and your osgeo install? I don't use windows that much. Can you check your gdal version to be sure it's 1.9.2: gdalinfo --version –  kyle Dec 31 '12 at 17:47

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.