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
.
我一直试图在我的电脑上安装mapnik几个小时,但是当我导入mapnik的时候,我总是会看到:DLL加载失败:无法找到指定的程序。
I'm using Windows 7. The currently installed software is Geoserver from Opengeo suite.
我使用Windows 7。当前安装的软件是Opengeo套件中的Geoserver。
Here is my path
这是我的路
%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
My python path:
我的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\;
2 个解决方案
#1
1
Follow the install instructions
First ensure you have 32 bit python 27 installed.
首先要确保安装了32位的python 27。
You can do this by typing the following into a python shell
您可以通过将以下内容输入到python shell中来实现这一点
>>> import platform
>>> platform.architecture()
('32bit', 'WindowsPE')
If you see '64bit'
, try reinstalling python with the 32bit
version (look for the "Python 2.7.5 Windows Installer" link).
如果您看到'64bit',请尝试使用32位版本重新安装python(请查看“python 2.7.5 Windows安装程序”链接)。
After that,
在那之后,
-
Download the
mapnik
package (I tested it with the full SDK version) - 下载mapnik包(我用完整的SDK版本测试了它)
- Extract the archive to
C:\mapnik-v2.2.0
- 将归档文件解压到C:\mapnik-v2.2.0
- Add
C:\mapnik-v2.2.0\lib;
andC:\mapnik-v2.2.0\bin;
to yourPATH
- 将C:\ mapnik-v2.2.0 \ lib。和C:\ mapnik-v2.2.0 \ bin。你的路径
- Add
C:\mapnik-v2.2.0\python\2.7\site-packages;
to yourPYTHONPATH
- python添加C:\ mapnik-v2.2.0 \ \ 2.7 \网站;到PYTHONPATH
import mapnik
进口mapnik
#2
1
I had the same issue on WinServewr 2008 R2. The solution I found is to install Microsoft Visual C++(x86) redistributable package 10.0.40219, because mapnik depends on it. This package comes with postgreSQL 9.3 x86, so when you install only Postgre x64 version you can have this error.
我在WinServewr 2008 R2上也有同样的问题。我发现的解决方案是安装Microsoft Visual c++ (x86)可重分发包10.0.40219,因为mapnik依赖于它。这个包附带了postgreSQL 9.3 x86,所以当您只安装Postgre x64版本时,您可能会出现这个错误。
#1
1
Follow the install instructions
First ensure you have 32 bit python 27 installed.
首先要确保安装了32位的python 27。
You can do this by typing the following into a python shell
您可以通过将以下内容输入到python shell中来实现这一点
>>> import platform
>>> platform.architecture()
('32bit', 'WindowsPE')
If you see '64bit'
, try reinstalling python with the 32bit
version (look for the "Python 2.7.5 Windows Installer" link).
如果您看到'64bit',请尝试使用32位版本重新安装python(请查看“python 2.7.5 Windows安装程序”链接)。
After that,
在那之后,
-
Download the
mapnik
package (I tested it with the full SDK version) - 下载mapnik包(我用完整的SDK版本测试了它)
- Extract the archive to
C:\mapnik-v2.2.0
- 将归档文件解压到C:\mapnik-v2.2.0
- Add
C:\mapnik-v2.2.0\lib;
andC:\mapnik-v2.2.0\bin;
to yourPATH
- 将C:\ mapnik-v2.2.0 \ lib。和C:\ mapnik-v2.2.0 \ bin。你的路径
- Add
C:\mapnik-v2.2.0\python\2.7\site-packages;
to yourPYTHONPATH
- python添加C:\ mapnik-v2.2.0 \ \ 2.7 \网站;到PYTHONPATH
import mapnik
进口mapnik
#2
1
I had the same issue on WinServewr 2008 R2. The solution I found is to install Microsoft Visual C++(x86) redistributable package 10.0.40219, because mapnik depends on it. This package comes with postgreSQL 9.3 x86, so when you install only Postgre x64 version you can have this error.
我在WinServewr 2008 R2上也有同样的问题。我发现的解决方案是安装Microsoft Visual c++ (x86)可重分发包10.0.40219,因为mapnik依赖于它。这个包附带了postgreSQL 9.3 x86,所以当您只安装Postgre x64版本时,您可能会出现这个错误。