问题描述
我已经尝试在计算机上安装mapnik了几个小时,但是导入mapnik时总是得到的是ImportError: DLL load failed: The specified procedure could not be found
.
I've been trying to install mapnik on my computer for hours but what i always get when I import mapnik is ImportError: DLL load failed: The specified procedure could not be found
.
我正在使用Windows7.当前安装的软件是Opengeo套件中的Geoserver.
I'm using Windows 7. The currently installed software is Geoserver from Opengeo suite.
这是我的路
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\Java\jre7\bin;C:\Program Files\Java\jdk1.7.0_45\bin;C:\Python27;C:\mapnik-v2.2.0\lib
我的python路径:
C:\Python27;C:\Python27\Lib;C:\Python27\DLLs;C:\Python27\Lib\lib-tk;C:\Program Files\ArcGIS\bin;C:\\mapnik-v2.2.0\python\2.7\site-packages\;C:\mapnik-v2.2.0\bin\;
推荐答案
按照安装说明进行操作
Follow the install instructions
您可以通过在python shell中键入以下内容来实现此目的
You can do this by typing the following into a python shell
>>> import platform
>>> platform.architecture()
('32bit', 'WindowsPE')
如果看到'64bit'
,请尝试使用32bit
版本重新安装 python (查找"Python 2.7.5 Windows Installer"链接.)
If you see '64bit'
, try reinstalling python with the 32bit
version (look for the "Python 2.7.5 Windows Installer" link).
之后,
- 下载
mapnik
程序包(我已使用完整的SDK版本对其进行了测试) li> - 将存档提取到
C:\mapnik-v2.2.0
- 将
C:\mapnik-v2.2.0\lib;
和C:\mapnik-v2.2.0\bin;
添加到PATH
- 将
C:\mapnik-v2.2.0\python\2.7\site-packages;
添加到您的PYTHONPATH
- Download the
mapnik
package (I tested it with the full SDK version) - Extract the archive to
C:\mapnik-v2.2.0
- Add
C:\mapnik-v2.2.0\lib;
andC:\mapnik-v2.2.0\bin;
to yourPATH
- Add
C:\mapnik-v2.2.0\python\2.7\site-packages;
to yourPYTHONPATH
import mapnik
这篇关于使用Python 2.7在Windows 7中安装Mapnik 2.2.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!