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.

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

share|improve this question
    
can you just use import gdal? –  ShaunLangley Mar 21 '13 at 21:22
2  
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
add comment

1 Answer 1

up vote 2 down vote accepted

Installing just the python bindings does not provide access to GDAL. I wrote a short blog post a few years ago that might be of assistance.

In short, 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.

share|improve this answer
add comment

Your Answer

 
discard

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

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