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/
C:\OSGeo4W\bin;first in my
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?