简体   繁体   English

Python GDal安装

[英]Python GDal installation

Having some problems with Gdal installation with python 2.7 on Windows 7 32bit. 在Windows 7 32bit上使用python 2.7安装Gdal时遇到一些问题。 I am running MSVC 2010. I have followed the instruction from the blog website 我正在运行MSVC2010。我已按照博客网站上的说明进行操作

http://cartometric.com/blog/2011/10/17/install-gdal-on-windows/ http://cartometric.com/blog/2011/10/17/install-gdal-on-windows/

The installation is fine. 安装很好。 At the end of it, I am able to run ogr2ogr in the MS-DOS and have gotten the similar screen as listed in the blog. 最后,我可以在MS-DOS中运行ogr2ogr,并获得与博客中列出的类似的屏幕。

However, when I am trying to use the command "import osgeo" on the Python IDLE GUI shell. 但是,当我尝试在Python IDLE GUI Shell上使用命令“ import osgeo”时。 A series of error message is released, reading like the following 发布了一系列错误消息,内容如下

"DLL error:.........." “ DLL错误:..........”

I believe that this might mean that the python binding is of wrong version. 我相信这可能意味着python绑定的版本错误。 I have cleared up my installation by removing the following: Python-Gdal binding, Gdal, Python 2.7 我已经通过删除以下代码清除了安装:Python-Gdal绑定,Gdal,Python 2.7

After removing them, I have retried my installation with Python 3.2.3 instead and loaded the Gdal package and python binding accordingly. 删除它们之后,我改用Python 3.2.3重试安装,并相应地加载了Gdal软件包和python绑定。 However, the same error returns. 但是,将返回相同的错误。

Is there any intermediate steps that I could take to verify the installation. 我可以采取任何中间步骤来验证安装。 Any other advice I could have to have the bindings installed? 还有其他建议我必须安装绑定吗? Or is my reinstallation method correct? 还是我的重新安装方法正确?

I have tried to install FWTools too. 我也尝试安装FWTools。 It doesnt seem to work either. 它似乎也不起作用。 I have run the Python shell from EV-shell and type in "import osgeo". 我已经从EV-shell运行了Python shell,然后输入“ import osgeo”。 Have gotten the message "no module exist...." 收到消息“不存在模块...。”

Thanks 谢谢

Get the precompiled gdal from here: 从此处获取预编译的gdal:

http://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal http://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal

I have some other notes on setting up postgres and postgis 2.0 here if you need it: 如果需要,我还有其他一些关于在此处设置postgres和postgis 2.0的说明:

http://monkut.webfactional.com/blog/archive/2012/5/2/using-django-14-with-gdal-19-and-postgis-20/ http://monkut.webfactional.com/blog/archive/2012/5/2/using-django-14-with-gdal-19-and-postgis-20/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM