我目前使用Enthought来运行python。
我想使用Mapnik,我已经成功地在我的机器上安装了这个
终端中的
mapnik -config -v
导致
2.2.0
然而,
python -c "import mapnik;print mapnik.__file__"
导致
an import error showing that there is no module named mapnik
我相信这是由于我没有正确地设置绑定。我还相信,路径变量在其他模块正确导入时是正确的,尽管所有这些都是通过冠层包安装程序安装的。
有人能帮我修理一下吗,或者地图不是靠树冠支撑的吗?如果冠层团队看到这个,你能在软件包安装程序中添加mapnik吗?
谢谢艾德
发布于 2013-08-20 12:49:03
您可能是针对不同的python安装构建mapnik的。在构建mapnik时,检查输出的第一行,找出安装Mapnik的python站点包:
Checking for C header file Python.h... yes
Bindings Python version... 2.6
Python 2.6 prefix... /usr
Python bindings will install in... /usr/lib64/python2.6/site-packages
在我看来,用于运行mapnik scon构建的python二进制文件是2.7.5,而构建过程则是2.6版本。我使用./configure (只需使用与scons.py相同的选项)、make和sudo make解决了问题。
https://stackoverflow.com/questions/17164989
复制相似问题