I would like to use the GDAL python binding in my GeoDjango site. The aim of this is to use ogr2ogr capabilities in a script. I am on windows 7 so I have installed GDAL-1.9.2.win32-py2.7 downloaded here

The installation went correctly. I can import GDAL in python with: from osgeo import GDAL

However, in my geodjango app python shell, I have an error when I try to import osgeo. The error is the following:

>>> import osgeo
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "C:\Python27\lib\site-packages\osgeo\__init__.py", line 21, in
_gdal = swig_import_helper()
  File "C:\Python27\lib\site-packages\osgeo\__init__.py", line 17, in
t_helper_mod = imp.load_module('_gdal', fp, pathname, description)
 ImportError: DLL load failed: La procÚdure spÚcifiÚe est introuvable.

Can someone help me with this?

Im using GeoDjango v. 1.4.3 | python 2.7.3 | GDAL 1.9.2 win32

  • can you just use import gdal? – ShaunLangley Mar 21 '13 at 21:22
  • 3
    import gdal is depreciated in favor of from osgeo import gdal – Jay Laura Mar 21 '13 at 21:31
  • I have the same error with import gdal – Below the Radar Mar 21 '13 at 23:47

You need to head over to gisinternals and download GDAL. Then you should have a working installation of GDAL from which from osgeo import gdal will work.

  • The link is dead. – wondim Aug 6 '17 at 1:11

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.