帮助解决 py2exe 错误
我正在尝试将我的 python 脚本编译为 exe,但收到一个错误,我不知道如何解决...
我的脚本包含此库
import pyHook
import pythoncom
import time
import win32com.client
,并且 py2exe 脚本是
from distutils.core import setup
import py2exe
import sys
sys.argv.append('py2exe')
setup(
options = {'py2exe': dict(bundle_files=1, optimize=1)},
console = ["login.macro.py"],
zipfile = None,
)
,并且我收到错误
Traceback (most recent call last):
File "login.macro.py", line 4, in <module>
File "zipextimporter.pyo", line 82, in load_module
File "win32com\__init__.pyo", line 5, in <module>
File "zipextimporter.pyo", line 98, in load_module
ImportError: MemoryLoadLibrary failed loading win32api.pyd
我该如何解决?
我刚刚编译了另一个脚本并且一切正常
I'm trying to compile to an exe my script of python, but I'm getting an error that I'm not know how to resolve...
my script include this libraries
import pyHook
import pythoncom
import time
import win32com.client
and the py2exe script is
from distutils.core import setup
import py2exe
import sys
sys.argv.append('py2exe')
setup(
options = {'py2exe': dict(bundle_files=1, optimize=1)},
console = ["login.macro.py"],
zipfile = None,
)
and I'm getting the error
Traceback (most recent call last):
File "login.macro.py", line 4, in <module>
File "zipextimporter.pyo", line 82, in load_module
File "win32com\__init__.pyo", line 5, in <module>
File "zipextimporter.pyo", line 98, in load_module
ImportError: MemoryLoadLibrary failed loading win32api.pyd
How can I solve it?
I've just compiled another script and went everything ok
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试
bundle_files=3
:http: //mail.python.org/pipermail/python-win32/2009-June/009227.html
Try
bundle_files=3
:http://mail.python.org/pipermail/python-win32/2009-June/009227.html