我正在尝试编译一个exe我的python脚本,但是我收到一个错误,我不知道如何解决...
我的脚本包含此库
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
我该如何解决?
我刚编译了另一个脚本并且一切正常
答案 0 :(得分:0)
尝试bundle_files=3
:
http://mail.python.org/pipermail/python-win32/2009-June/009227.html