English 中文(简体)
pyinstaller 1.5.1, nameError: global name zipfile is not defined, http://www.pyinstaller.org/ticket/308
原标题:pyinstaller 1.5.1, NameError: global name zipfile is not defined, http://www.pyinstaller.org/ticket/308

问题

出于某种原因,Pyinstaller没有为我工作。 谁能提供帮助?

另有类似情况:。 http://www.pyinstaller.org/ticket/308

But it seems fixed????

感谢!

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
问题回答

开放档案。 在Pyinstaller的名录中,你将看到“进口齐pfile”的说法只是放在一个窗口上。

在“如果”声明之前添加“进口单”,对我有用。





相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...

热门标签