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 Installing GDAL with Python on windows? and elsewhere, here's what I've done so far:
- removed all versions of python and started with a clean install of 2.7.3
- installed gdal with the OSGeo4W installer
- installed the native Win gdal binaries from http://www.lfd.uci.edu/~gohlke/pythonlibs/
- added
C:\OSGeo4W\bin;first in myPathvariable - tried
from osgeo import gdal - launched python from within the OSGeo4W Shell
- run the procedure outlined in http://cartometric.com/blog/2011/10/17/install-gdal-on-windows/
The result is the same. Any other ideas about how to troubleshoot this?









from osgeo. – meetar Dec 31 '12 at 16:28gdalinfo --versionthrows an error: "Unable To Locate Component: This application has failed to start because ogdi_32b1.dll was not found. Re-installing the application may fix this problem." This leads me to this thread: http://comments.gmane.org/gmane.comp.gis.osgeo.osgeo4w/359 ... and I am on a 64-bit machine. (The 2nd line of gdal.py says it's 2.0.8, btw.) So maybe I'm out of luck. – meetar Jan 08 '13 at 18:07