pyinstaller 1.5.1,名称错误:全局名称“zipfile”未定义,http://www.pyinstaller.org/ticket/308
问题
由于某种原因,pyinstaller 不适合我......有人可以帮忙吗?
此处报告了类似情况的错误:http://www.pyinstaller.org/ticket/308
但似乎已经修复了????
谢谢!
python pyinstaller-1.5.1/Build.py icinga.spec
checking Analysis
building Analysis because outAnalysis0.toc non existent
running Analysis outAnalysis0.toc
Analyzing: pyinstaller-1.5.1/support/_mountzlib.py
Analyzing: pyinstaller-1.5.1/support/useUnicode.py
Analyzing: icinga.py
I: Analyzing /usr/bin/python
I: Adding libpython2.4.so.1.0 dependency of python
I: Skipping libpthread.so.0 dependency of python
I: Skipping libdl.so.2 dependency of python
I: Adding libutil.so.1 dependency of python
I: Skipping libm.so.6 dependency of python
I: Skipping libc.so.6 dependency of python
I: Analyzing /usr/lib64/libpython2.4.so.1.0
I: Skipping libpthread.so.0 dependency of libpython2.4.so.1.0
I: Skipping libdl.so.2 dependency of libpython2.4.so.1.0
I: Skipping libm.so.6 dependency of libpython2.4.so.1.0
I: Skipping libc.so.6 dependency of libpython2.4.so.1.0
I: Analyzing /lib64/libutil.so.1
I: Skipping libc.so.6 dependency of libutil.so.1
I: Analyzing /usr/lib64/python2.4/lib-dynload/_bisect.so
I: Skipping libpthread.so.0 dependency of _bisect.so
I: Skipping libc.so.6 dependency of _bisect.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/structmodule.so
I: Skipping libpthread.so.0 dependency of structmodule.so
I: Skipping libc.so.6 dependency of structmodule.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/collectionsmodule.so
I: Skipping libpthread.so.0 dependency of collectionsmodule.so
I: Skipping libc.so.6 dependency of collectionsmodule.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/md5module.so
I: Skipping libpthread.so.0 dependency of md5module.so
I: Skipping libc.so.6 dependency of md5module.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/_socketmodule.so
I: Skipping libpthread.so.0 dependency of _socketmodule.so
I: Skipping libc.so.6 dependency of _socketmodule.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/datetime.so
I: Skipping libm.so.6 dependency of datetime.so
I: Skipping libpthread.so.0 dependency of datetime.so
I: Skipping libc.so.6 dependency of datetime.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/_codecs_iso2022.so
I: Skipping libpthread.so.0 dependency of _codecs_iso2022.so
I: Skipping libc.so.6 dependency of _codecs_iso2022.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/_randommodule.so
I: Skipping libpthread.so.0 dependency of _randommodule.so
I: Skipping libc.so.6 dependency of _randommodule.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/_codecs_tw.so
I: Skipping libpthread.so.0 dependency of _codecs_tw.so
I: Skipping libc.so.6 dependency of _codecs_tw.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/mathmodule.so
I: Skipping libpthread.so.0 dependency of mathmodule.so
I: Skipping libc.so.6 dependency of mathmodule.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/fcntlmodule.so
I: Skipping libpthread.so.0 dependency of fcntlmodule.so
I: Skipping libc.so.6 dependency of fcntlmodule.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/itertoolsmodule.so
I: Skipping libpthread.so.0 dependency of itertoolsmodule.so
I: Skipping libc.so.6 dependency of itertoolsmodule.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/cStringIO.so
I: Skipping libpthread.so.0 dependency of cStringIO.so
I: Skipping libc.so.6 dependency of cStringIO.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/shamodule.so
I: Skipping libpthread.so.0 dependency of shamodule.so
I: Skipping libc.so.6 dependency of shamodule.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/_codecs_jp.so
I: Skipping libpthread.so.0 dependency of _codecs_jp.so
I: Skipping libc.so.6 dependency of _codecs_jp.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/arraymodule.so
I: Skipping libpthread.so.0 dependency of arraymodule.so
I: Skipping libc.so.6 dependency of arraymodule.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/_heapq.so
I: Skipping libpthread.so.0 dependency of _heapq.so
I: Skipping libc.so.6 dependency of _heapq.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/binascii.so
I: Skipping libpthread.so.0 dependency of binascii.so
I: Skipping libc.so.6 dependency of binascii.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/_localemodule.so
I: Skipping libpthread.so.0 dependency of _localemodule.so
I: Skipping libc.so.6 dependency of _localemodule.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/termios.so
I: Skipping libpthread.so.0 dependency of termios.so
I: Skipping libc.so.6 dependency of termios.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/_codecs_cn.so
I: Skipping libpthread.so.0 dependency of _codecs_cn.so
I: Skipping libc.so.6 dependency of _codecs_cn.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/unicodedata.so
I: Skipping libpthread.so.0 dependency of unicodedata.so
I: Skipping libc.so.6 dependency of unicodedata.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/_codecs_kr.so
I: Skipping libpthread.so.0 dependency of _codecs_kr.so
I: Skipping libc.so.6 dependency of _codecs_kr.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/zlibmodule.so
I: Adding libz.so.1 dependency of zlibmodule.so
I: Skipping libpthread.so.0 dependency of zlibmodule.so
I: Skipping libc.so.6 dependency of zlibmodule.so
I: Analyzing /usr/lib64/python2.4/site-packages/MySQL_python-1.2.3-py2.4-linux-x86_64.egg/_mysql.so
Traceback (most recent call last):
File "pyinstaller-1.5.1/Build.py", line 1494, in ?
main(args[0], configfilename=opts.configfile)
File "pyinstaller-1.5.1/Build.py", line 1472, in main
build(specfile)
File "pyinstaller-1.5.1/Build.py", line 1429, in build
execfile(spec)
File "icinga.spec", line 3, in ?
pathex=['/home/vboulytchev/projects/icinga'])
File "pyinstaller-1.5.1/Build.py", line 347, in __init__
self.__postinit__()
File "pyinstaller-1.5.1/Build.py", line 298, in __postinit__
self.assemble()
File "pyinstaller-1.5.1/Build.py", line 469, in assemble
manifest=depmanifest))
File "/home/vboulytchev/projects/icinga/pyinstaller-1.5.1/bindepend.py", line 348, in Dependencies
for lib, npth in selectImports(pth, platform, xtrapath):
File "/home/vboulytchev/projects/icinga/pyinstaller-1.5.1/bindepend.py", line 572, in selectImports
dlls = getImports(pth, platform=platform)
File "/home/vboulytchev/projects/icinga/pyinstaller-1.5.1/bindepend.py", line 678, in getImports
pth = check_extract_from_egg(pth)[0][0]
File "/home/vboulytchev/projects/icinga/pyinstaller-1.5.1/bindepend.py", line 423, in check_extract_from_egg
except zipfile.BadZipfile, e:
NameError: global name 'zipfile' is not defined
problem
For some reason, pyinstaller is not working for me.... Can someone please help?
A bug was reported with similar circumstances here: http://www.pyinstaller.org/ticket/308
But it seems fixed????
Thanks!
python pyinstaller-1.5.1/Build.py icinga.spec
checking Analysis
building Analysis because outAnalysis0.toc non existent
running Analysis outAnalysis0.toc
Analyzing: pyinstaller-1.5.1/support/_mountzlib.py
Analyzing: pyinstaller-1.5.1/support/useUnicode.py
Analyzing: icinga.py
I: Analyzing /usr/bin/python
I: Adding libpython2.4.so.1.0 dependency of python
I: Skipping libpthread.so.0 dependency of python
I: Skipping libdl.so.2 dependency of python
I: Adding libutil.so.1 dependency of python
I: Skipping libm.so.6 dependency of python
I: Skipping libc.so.6 dependency of python
I: Analyzing /usr/lib64/libpython2.4.so.1.0
I: Skipping libpthread.so.0 dependency of libpython2.4.so.1.0
I: Skipping libdl.so.2 dependency of libpython2.4.so.1.0
I: Skipping libm.so.6 dependency of libpython2.4.so.1.0
I: Skipping libc.so.6 dependency of libpython2.4.so.1.0
I: Analyzing /lib64/libutil.so.1
I: Skipping libc.so.6 dependency of libutil.so.1
I: Analyzing /usr/lib64/python2.4/lib-dynload/_bisect.so
I: Skipping libpthread.so.0 dependency of _bisect.so
I: Skipping libc.so.6 dependency of _bisect.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/structmodule.so
I: Skipping libpthread.so.0 dependency of structmodule.so
I: Skipping libc.so.6 dependency of structmodule.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/collectionsmodule.so
I: Skipping libpthread.so.0 dependency of collectionsmodule.so
I: Skipping libc.so.6 dependency of collectionsmodule.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/md5module.so
I: Skipping libpthread.so.0 dependency of md5module.so
I: Skipping libc.so.6 dependency of md5module.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/_socketmodule.so
I: Skipping libpthread.so.0 dependency of _socketmodule.so
I: Skipping libc.so.6 dependency of _socketmodule.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/datetime.so
I: Skipping libm.so.6 dependency of datetime.so
I: Skipping libpthread.so.0 dependency of datetime.so
I: Skipping libc.so.6 dependency of datetime.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/_codecs_iso2022.so
I: Skipping libpthread.so.0 dependency of _codecs_iso2022.so
I: Skipping libc.so.6 dependency of _codecs_iso2022.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/_randommodule.so
I: Skipping libpthread.so.0 dependency of _randommodule.so
I: Skipping libc.so.6 dependency of _randommodule.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/_codecs_tw.so
I: Skipping libpthread.so.0 dependency of _codecs_tw.so
I: Skipping libc.so.6 dependency of _codecs_tw.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/mathmodule.so
I: Skipping libpthread.so.0 dependency of mathmodule.so
I: Skipping libc.so.6 dependency of mathmodule.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/fcntlmodule.so
I: Skipping libpthread.so.0 dependency of fcntlmodule.so
I: Skipping libc.so.6 dependency of fcntlmodule.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/itertoolsmodule.so
I: Skipping libpthread.so.0 dependency of itertoolsmodule.so
I: Skipping libc.so.6 dependency of itertoolsmodule.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/cStringIO.so
I: Skipping libpthread.so.0 dependency of cStringIO.so
I: Skipping libc.so.6 dependency of cStringIO.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/shamodule.so
I: Skipping libpthread.so.0 dependency of shamodule.so
I: Skipping libc.so.6 dependency of shamodule.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/_codecs_jp.so
I: Skipping libpthread.so.0 dependency of _codecs_jp.so
I: Skipping libc.so.6 dependency of _codecs_jp.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/arraymodule.so
I: Skipping libpthread.so.0 dependency of arraymodule.so
I: Skipping libc.so.6 dependency of arraymodule.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/_heapq.so
I: Skipping libpthread.so.0 dependency of _heapq.so
I: Skipping libc.so.6 dependency of _heapq.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/binascii.so
I: Skipping libpthread.so.0 dependency of binascii.so
I: Skipping libc.so.6 dependency of binascii.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/_localemodule.so
I: Skipping libpthread.so.0 dependency of _localemodule.so
I: Skipping libc.so.6 dependency of _localemodule.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/termios.so
I: Skipping libpthread.so.0 dependency of termios.so
I: Skipping libc.so.6 dependency of termios.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/_codecs_cn.so
I: Skipping libpthread.so.0 dependency of _codecs_cn.so
I: Skipping libc.so.6 dependency of _codecs_cn.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/unicodedata.so
I: Skipping libpthread.so.0 dependency of unicodedata.so
I: Skipping libc.so.6 dependency of unicodedata.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/_codecs_kr.so
I: Skipping libpthread.so.0 dependency of _codecs_kr.so
I: Skipping libc.so.6 dependency of _codecs_kr.so
I: Analyzing /usr/lib64/python2.4/lib-dynload/zlibmodule.so
I: Adding libz.so.1 dependency of zlibmodule.so
I: Skipping libpthread.so.0 dependency of zlibmodule.so
I: Skipping libc.so.6 dependency of zlibmodule.so
I: Analyzing /usr/lib64/python2.4/site-packages/MySQL_python-1.2.3-py2.4-linux-x86_64.egg/_mysql.so
Traceback (most recent call last):
File "pyinstaller-1.5.1/Build.py", line 1494, in ?
main(args[0], configfilename=opts.configfile)
File "pyinstaller-1.5.1/Build.py", line 1472, in main
build(specfile)
File "pyinstaller-1.5.1/Build.py", line 1429, in build
execfile(spec)
File "icinga.spec", line 3, in ?
pathex=['/home/vboulytchev/projects/icinga'])
File "pyinstaller-1.5.1/Build.py", line 347, in __init__
self.__postinit__()
File "pyinstaller-1.5.1/Build.py", line 298, in __postinit__
self.assemble()
File "pyinstaller-1.5.1/Build.py", line 469, in assemble
manifest=depmanifest))
File "/home/vboulytchev/projects/icinga/pyinstaller-1.5.1/bindepend.py", line 348, in Dependencies
for lib, npth in selectImports(pth, platform, xtrapath):
File "/home/vboulytchev/projects/icinga/pyinstaller-1.5.1/bindepend.py", line 572, in selectImports
dlls = getImports(pth, platform=platform)
File "/home/vboulytchev/projects/icinga/pyinstaller-1.5.1/bindepend.py", line 678, in getImports
pth = check_extract_from_egg(pth)[0][0]
File "/home/vboulytchev/projects/icinga/pyinstaller-1.5.1/bindepend.py", line 423, in check_extract_from_egg
except zipfile.BadZipfile, e:
NameError: global name 'zipfile' is not defined
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
打开 pyinstaller 目录中的 bindepend.py 文件,您将看到仅在 Windows 操作系统上使用的语句“import zipfile”。
只需在语句“if”之前添加“import zipfile”,它对我有用。
open the file bindepend.py in pyinstaller directory, you will see the statement "import zipfile" only being used on a windows OS.
just add "import zipfile" before the statement "if", it works for me.