我想在我的 GeoDjango 站点中使用 GDAL python 绑定。这样做的目的是在脚本中使用 ogr2ogr 功能。我在 Windows 7 上,所以我安装了 GDAL-1.9.2.win32-py2.7 下载here
安装正确。我可以在python中导入GDAL:from osgeo import GDAL
但是,在我的 geodjango 应用程序 python shell 中,当我尝试导入 osgeo 时出现错误。错误如下:
>>> 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.
>>>
有人可以帮我弄这个吗?
我正在使用 GeoDjango v. 1.4.3 | 蟒蛇2.7.3 | GDAL 1.9.2 win32