我尝试使用pyinstaller编译我的Python程序,命令如下:
pyinstaller.py -F zchat_server.py
并且收到了错误消息:
F:\workplace\Python\network-study\zchat\dist>zchat_server.exe
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "D:\pyinstaller-2.0\PyInstaller\loader\iu.py", line 386, in importHook
mod = _self_doimport(nm, ctx, fqname)
File "D:\pyinstaller-2.0\PyInstaller\loader\iu.py", line 480, in doimport
exec co in mod.__dict__
File "F:\workplace\Python\network-study\zchat\build\pyi.win32\zchat_server\out
00-PYZ.pyz\twisted", line 53, in <module>
File "F:\workplace\Python\network-study\zchat\build\pyi.win32\zchat_server\out
00-PYZ.pyz\twisted", line 37, in _checkRequirements
ImportError: Twisted requires zope.interface 3.6.0 or later: no module named zop
e.interface.
我是新手,我编译了我的zchat_view.py(使用wxPython),一切都很好。 但是对于Twisted,我感到困惑。希望得到解决。
__init__.py
添加到C:\Python27\Lib\site-packages\zope
文件夹中的 zope 文件夹中。 - frmdstryr