- 论坛徽章:
- 2
|
我个人比较喜欢pyinstaller,因为不需要写代码。顺便做个广告,pyinstaller真不错。
以前一直用它打包普通的代码,都成功了。
我现在想打包wxpython的程序,就失败了:
------------------------------------------------------------
操作系统: XP SP2
Python版本: Python2.6
wxPython版本: wxPython2.8-win32-unicode-2.8.10.1-py26
pyinstaller版本: pyinstaller-1.3
-------------------------------------------------------------
打包后,没出什么大错,就是程序显示不了,双击运行后,出现一个黑框,瞬间消失(我使用了.pyw,应该不会跳出黑框)。这是打包日志:
W: no module named posix (conditional import by os)
W: no module named optik.__all__ (top-level import by optparse)
W: no module named readline (delayed, conditional import by cmd)
W: no module named wxPython.wx (top-level import by __main__)
W: no module named readline (delayed import by pdb)
W: no module named pwd (delayed, conditional import by posixpath)
W: no module named win32api (delayed import by iu)
W: no module named org (top-level import by pickle)
W: no module named posix (delayed, conditional import by iu)
W: no module named fcntl (conditional import by subprocess)
W: no module named org (top-level import by copy)
W: no module named _emx_link (conditional import by os)
W: no module named optik.__version__ (top-level import by optparse)
W: no module named fcntl (top-level import by tempfile)
W: __all__ is built strangely at line 0 - collections (C:\Python26\lib\collections.pyc)
W: delayed exec statement detected at line 0 - collections (C:\Python26\lib\collections.pyc)
W: delayed conditional __import__ hack detected at line 0 - doctest (C:\Python26\lib\doctest.pyc)
W: delayed exec statement detected at line 0 - doctest (C:\Python26\lib\doctest.pyc)
W: delayed conditional __import__ hack detected at line 0 - doctest (C:\Python26\lib\doctest.pyc)
W: delayed __import__ hack detected at line 0 - encodings (C:\Python26\lib\encodings\__init__.pyc)
W: __all__ is built strangely at line 0 - optparse (C:\Documents and Settings\Gavinwu\桌面\pyinstaller-1.3\optparse.pyc)
W: __all__ is built strangely at line 0 - dis (C:\Python26\lib\dis.pyc)
W: delayed eval hack detected at line 0 - os (C:\Python26\lib\os.pyc)
W: __all__ is built strangely at line 0 - __future__ (C:\Python26\lib\__future__.pyc)
W: delayed conditional __import__ hack detected at line 0 - unittest (C:\Python26\lib\unittest.pyc)
W: delayed conditional __import__ hack detected at line 0 - unittest (C:\Python26\lib\unittest.pyc)
W: __all__ is built strangely at line 0 - tokenize (C:\Python26\lib\tokenize.pyc)
W: __all__ is built strangely at line 0 - wx (C:\Python26\lib\site-packages\wx-2.8-msw-unicode\wx\__init__.pyc)
W: __all__ is built strangely at line 0 - wx (C:\Python26\lib\site-packages\wx-2.8-msw-unicode\wx\__init__.pyc)
W: delayed exec statement detected at line 0 - bdb (C:\Python26\lib\bdb.pyc)
W: delayed eval hack detected at line 0 - bdb (C:\Python26\lib\bdb.pyc)
W: delayed eval hack detected at line 0 - bdb (C:\Python26\lib\bdb.pyc)
W: delayed __import__ hack detected at line 0 - pickle (C:\Python26\lib\pickle.pyc)
W: delayed __import__ hack detected at line 0 - pickle (C:\Python26\lib\pickle.pyc)
W: delayed conditional exec statement detected at line 0 - iu (C:\Documents and Settings\Gavinwu\桌面\pyinstaller-1.3\iu.pyc)
W: delayed conditional exec statement detected at line 0 - iu (C:\Documents and Settings\Gavinwu\桌面\pyinstaller-1.3\iu.pyc)
W: delayed eval hack detected at line 0 - gettext (C:\Python26\lib\gettext.pyc)
W: delayed __import__ hack detected at line 0 - optik.option_parser (C:\Documents and Settings\Gavinwu\桌面\pyinstaller-1.3\optik\option_parser.pyc)
W: delayed conditional eval hack detected at line 0 - warnings (C:\Python26\lib\warnings.pyc)
W: delayed conditional __import__ hack detected at line 0 - warnings (C:\Python26\lib\warnings.pyc)
W: __all__ is built strangely at line 0 - optik (C:\Documents and Settings\Gavinwu\桌面\pyinstaller-1.3\optik\__init__.pyc)
W: delayed exec statement detected at line 0 - pdb (C:\Python26\lib\pdb.pyc)
W: delayed conditional eval hack detected at line 0 - pdb (C:\Python26\lib\pdb.pyc)
W: delayed eval hack detected at line 0 - pdb (C:\Python26\lib\pdb.pyc)
W: delayed conditional eval hack detected at line 0 - pdb (C:\Python26\lib\pdb.pyc)
W: delayed eval hack detected at line 0 - pdb (C:\Python26\lib\pdb.pyc) |
|