在 Windows XP 上安装 mapnik 失败,并显示消息“导入错误:DLL 加载失败:找不到指定的过程。”

发布于 2024-12-07 00:55:37 字数 798 浏览 4 评论 0原文

我正在尝试在 Windows XP 上安装 mapnik。

认真按照其网站上的说明进行操作 (http://trac.mapnik.org/wiki/WindowsInstallation),它失败并显示消息:

    File "<stdin>", line 1, in <module>
    File "C:\mapnik-0.7.1\python\2.6\site-packages\mapnik\__init__.py", line 43, in <module> from _mapnik import *
    ImportError: DLL load failed: The specified procedure could not be found.

我也尝试了 OSGEO4W 安装程序,但没有成功,但在显示相同的错误消息之前还会生成一个弹出窗口:

    "The procedure entry point xmlCtxtReadMemory could not be located in the dynamic link library libxml2.dll."

故障排除建议突出显示了几个可能丢失的 dll。我安装了这两个但未能解决问题。

Dependency Walker 又发现了另外三个缺失的 dll,我也安装了它们,但仍然没有解决问题。

任何建议都非常感谢!

I'm trying to install mapnik on Windows XP.

After diligently following the instructions on their website (http://trac.mapnik.org/wiki/WindowsInstallation), it fails with the message:

    File "<stdin>", line 1, in <module>
    File "C:\mapnik-0.7.1\python\2.6\site-packages\mapnik\__init__.py", line 43, in <module> from _mapnik import *
    ImportError: DLL load failed: The specified procedure could not be found.

I tried the OSGEO4W installer as well, which is no more successful but before displaying the same error message also produces a pop-up saying:

    "The procedure entry point xmlCtxtReadMemory could not be located in the dynamic link library libxml2.dll."

The Trouble Shooting suggestions highlighted a couple of possible missing dlls. I installed both of those but failed to resolve the problem.

Dependency Walker identified a further three missing dlls, which I also installed, and yet still without solving the problem.

Any suggestions hugely appreciated!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

冬天旳寂寞 2024-12-14 00:55:37

这是一个相当古老的线程。然而,我刚刚遇到了同样的问题,并且能够通过我在网络上找到的不同提示来解决它。

  1. 我必须确保我有 32 位版本的 Python。我使用 Windows x86 MSI 安装程序 (2.7.2)
  2. 我为 Python 设置了 PATH 变量:C:\Program Files (x86)\Python27
  3. 我下载并安装了 Mapnik v2.2.0 Windows 32 位软件包(因此没有 SDK 版本)
  4. 我设置了lib 和 bin 文件夹的 PATH 变量按以下顺序排列:C:\Program Files\mapnik-v2.2.0\lib;C:\Program Files\mapnik-v2.2.0\bin (这里是重要的部分:确保将这两个条目放在路径变量的最开头,如 zvolsky 在 https://github.com/mapnik/mapnik-packaging/issues/109)
  5. 确保您的 c:\windows 文件夹中有 libxml2.dll,如 Joan 提到的Natalie 安装 Mapnik 2.2.0 windows 7 with Python 2.7 我刚刚从我的mapnik安装文件夹C:\Program Files\mapnik-v2.2.0\lib复制了dll文件

之后我就能够执行命令“导入mapnik”没有任何问题。我还能够执行第 5 处所述的 python 演示:https://gist.github。 com/springmeyer/5651701

所以我想我有两个问题。首先,我以某种方式丢失了 libxml2.dll 文件,其次,因为我将 mapnik 条目放在最后的 PATH 变量中,所以 python 不知何故采取了错误的条目,因为我的系统上有许多相同的 dll。

希望我能在这里提供缺少的解决方案。

This is quite an old thread. However I just ran into the same problem and was able to solve it with different hints which I found across the web.

  1. I had to make sure that I have the 32bit version of Python. I used Windows x86 MSI Installer (2.7.2)
  2. I set the PATH variable for Python: C:\Program Files (x86)\Python27
  3. I downloaded and installed Mapnik v2.2.0 Windows 32 bit Package (so no SDK version)
  4. I set the PATH variables for the lib and the bin folder in this order: C:\Program Files\mapnik-v2.2.0\lib;C:\Program Files\mapnik-v2.2.0\bin (here comes the important part: make sure you put these two entries at the very beginning of the path variable as stated by zvolsky at https://github.com/mapnik/mapnik-packaging/issues/109)
  5. Make sure you have the libxml2.dll in your c:\windows folder as mentioned by Joan Natalie at Installing Mapnik 2.2.0 in windows 7 with Python 2.7 I just copied the dll file from my mapnik install folder C:\Program Files\mapnik-v2.2.0\lib

After that I was able to execute the command "import mapnik" without any issues. I was also able to execute the python demo as stated here at number 5: https://gist.github.com/springmeyer/5651701

So I guess I had two problems. First the fact that I was somehow missing the libxml2.dll file and second that because I put the mapnik entries in the PATH variable at the end, python somehow took a wrong one since there are many of the same dll's on my system.

Hope I could provide the missing solution here.

我一直都在从未离去 2024-12-14 00:55:37

尝试为 Windows 安装 libxml / libxml2。似乎您可能会缺少依赖项,或者您的 libxml2.dll 可能已过时。 zlatkovic.com 是 libxml Windows 二进制文件的位置:

libxml(2)

在此处下载: ftp://ftp.zlatkovic.com/libxml/

Try installing libxml / libxml2 for windows. Seems you might be missing that as a dependancy or yourl libxml2.dll may be out of date. zlatkovic.com is the place for windows binaries of libxml:

libxml(2)

Downloads here: ftp://ftp.zlatkovic.com/libxml/

掀纱窥君容 2024-12-14 00:55:37

我遇到了同样的问题(在 Windows Server 2012 R2 上)。
我在谷歌上搜索了很多,并尝试了上述所有答案。
顺便说一句,今天 mapnik 通过静态地址链接修复了 libxml2.dll。

最后,我的问题是在 PATH 变量中的 mapnik lib 路径(“C:\mapnik-v2.2.0\lib”)的第一个和最后一个中使用双引号!!!

你不应该在系统环境变量中使用双引号。

我将“C:\mapnik-v2.2.0\lib”更改为 C:\mapnik-v2.2.0\lib,一切正常。 ;)

I had the same problem (on windows server 2012 R2).
i searched a lot on google and i tried all of the above answers.
btw today mapnik is fixed the libxml2.dll by linking with static address.

And Finally my problem was using double quotation in first and last of the mapnik lib path("C:\mapnik-v2.2.0\lib") in PATH variable!!!!

you should NOT use double quotation in system environment variables.

i changed "C:\mapnik-v2.2.0\lib" to C:\mapnik-v2.2.0\lib and every thing works fine. ;)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文