[英]py2exe or pyinstaller fail to include jaraco.util
I have a small python script for irc which needs jaraco.util
to function. 我有一个用于irc的小python脚本,需要
jaraco.util
才能起作用。 Requirement is to release it as binary on windows so I've tried with py2exe and pyinstaller . 要求是在Windows上以二进制形式发布它,因此我尝试使用py2exe和pyinstaller 。
I am using WinPython-64bit-2.7.6.4 我正在使用WinPython-64bit-2.7.6.4
I have some experience with py2exe
from previous projects, I tried the 'includes' option as well but without any success. 我在以前的项目中有使用
py2exe
经验,我也尝试了'includes'选项,但没有成功。 The error is pretty much standard: 该错误几乎是标准的:
ImportError: No module named jaraco
Or jaraco.util
etc. if I try to include it via setup.py
for the py2exe
build. 或
jaraco.util
等。如果我尝试通过setup.py
将其包含在py2exe
构建中。
'includes': [
'jaraco.util',
'irc',
'ConfigParser',
],
Normally it should auto-detect the dependencies but if I leave it without the include it will build the exe but fail to execute with a similar error: 通常,它应该自动检测依赖项,但是如果我不包含include的话,它将生成exe,但无法执行,并出现类似的错误:
Traceback (most recent call last)
File "irc\client.pyc", line 67, in <module>
ImportError: No module named jaraco.util.itertools
In winpython
site-packages I have: 在
winpython
站点软件包中,我有:
jaraco
jaraco.timing-1.0-py2.7-nspkg.pth
jaraco.timing-1.0-py2.7.egg-info
jaraco.util-10.6-py2.7-nspkg.pth
jaraco.util-10.6-py2.7.egg-info
I also tried to reinstall jaraco.util
and to copy it manually after the build but it will still not work. 我还尝试重新安装
jaraco.util
并在构建后手动将其复制,但仍然无法正常工作。
I've searched on-line for a solution for at least a couple of hours but to no avail. 我已经在网上搜索了至少两个小时的解决方案,但无济于事。 so I'm trying here maybe you guys have run into similar issues (or maybe I'm doing something wrong...)
所以我在这里尝试也许你们遇到了类似的问题(或者我做错了...)
Thank you 谢谢
I think the problem is that jaraco
was installed via easy_install jaraco.util
, thus creating python eggs, which aren't supported by py2exe
, as detailed by its FAQ . 我认为问题在于
jaraco
是通过easy_install jaraco.util
安装的,从而创建了python鸡蛋, py2exe
不支持python鸡蛋,如其FAQ所述 。
Try specifying the flag --always-unzip
as an option to easy_install
. 尝试将标志
--always-unzip
指定为easy_install
的选项。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.