pyinstaller 1.5.1,名称错误:全局名称“zipfile”未定义,http://www.pyinstaller.org/ticket/308

发布于 2024-12-05 08:48:13 字数 6673 浏览 2 评论 0原文

问题

由于某种原因,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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

忱杏 2024-12-12 08:48:13

打开 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文