包含 pysvn 时加载 py2exe 程序失败
我正在尝试运行包含 pysvn 的 py2exe 程序(package.py)。它无法运行,并出现以下错误:
Traceback (most recent call last):
File "package.py", line 27, in <module>
File "zipextimporter.pyc", line 82, in load_module
File "pysvn\__init__.pyc", line 99, in <module>
File "zipextimporter.pyc", line 98, in load_module
ImportError: MemoryLoadLibrary failed loading pysvn\_pysvn_2_6.pyd
该脚本对于办公室中的其他人来说运行良好,区别在于我使用的是 Windows 7 x64,而他们使用的是 WinXP x86。我的 pysvn 目录中有 _pysvn_2_6.pyd 。
Py2exe 的“要修复的问题”页面有与 WxPython 类似的错误消息,它找不到所需的系统模块,但我没有使用 WxPython 并且我有他们引用的 dll。
“使用各种包和模块”的 py2exe 页面没有引用 pysvn,而且我找不到其他有类似问题的人。
我已经检查了 py2exe 的输出,如这个答案< /a>,但我的计算机似乎在正确的位置拥有所需的所有二进制文件。
编辑: 我只是尝试在同一台计算机上运行其他 py2exe 创建的程序,但它们也失败了。看来问题出在我的机器(即 x64)而不是我正在转换的特定程序上;我在另一个程序中遇到类似的错误:
Traceback (most recent call last):
File "rundemo.py", line 13, in <module>
import win32api as w32
File "zipextimporter.pyc", line 98, in load_module
ImportError: MemoryLoadLibrary failed loading win32api.pyd
EDIT2: 我在 32 位机器上尝试了从 64 位公司生成的 py2exe 程序,但它们失败并出现相同的错误。我想我正在生成 32 位 exe(py2exe 文档说 64 位支持是实验性的,我还没有明确打开它),但我不确定如何检查以确定。
I am attempting to run a py2exe'd program (package.py) that includes pysvn. It is failing to run with the following error:
Traceback (most recent call last):
File "package.py", line 27, in <module>
File "zipextimporter.pyc", line 82, in load_module
File "pysvn\__init__.pyc", line 99, in <module>
File "zipextimporter.pyc", line 98, in load_module
ImportError: MemoryLoadLibrary failed loading pysvn\_pysvn_2_6.pyd
The script runs fine for others in the office, the difference being I'm on Windows 7 x64 with them on WinXP x86. I do have _pysvn_2_6.pyd in my pysvn directory.
Py2exe's "Problems to be Fixed" page has a similar error message with WxPython where it cannot find a needed system module, but I am not using WxPython and I have the dll they refer to anyway.
The py2exe page for "Working with Various Packages and Modules" doesn't refer to pysvn, and I can't find anyone else with similar problems.
I've checked the output of py2exe as outlined by this answer, but my computer seems to have all the binary files required in the correct locations.
EDIT:
I just tried to run other py2exe created programs on this same machine and they failed as well. It seems that the problem is with my machine (ie x64) rather than the specific program I was converting; I get a similar error with another program:
Traceback (most recent call last):
File "rundemo.py", line 13, in <module>
import win32api as w32
File "zipextimporter.pyc", line 98, in load_module
ImportError: MemoryLoadLibrary failed loading win32api.pyd
EDIT2:
I tried the py2exe programs generated from my 64 bit compy on a 32 bit machine, and they failed with the same error. I think I'm generating 32 bit exe's (py2exe docs say 64-bit support is experimental, and I haven't explicitly turned it on), but I'm not sure how to check to be sure.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
安装 PyWin32。
Install PyWin32.
py2exe 项目似乎已经死了,所以我们用 C++ 重写了我们的 exe。我们仍然可以在我们的机器上构建 Win7 x64,但我们无法让 Win7 上编写的 exe 在任何旧版本上运行。
The py2exe project seems dead, so we rewrote our exes in C++. We can still build for Win7 x64 on our machines, but we couldn't get exe's wrote on Win7 to run on anything older.