Pyinstaller无法正常工作

时间:2011-11-16 22:26:35

标签: python pyinstaller

我试图使用Pyinstaller创建一个独立的可执行文件。从Configure到Makespec部分的过程很顺利。但在处理Build.py时,显示以下错误。

  checking PYZ
    rebuilding outPYZ1.toc because outPYZ1.pyz is missing
    building PYZ outPYZ1.toc
    checking PKG
    rebuilding outPKG3.toc because outPKG3.pkg is missing
    building PKG outPKG3.pkg
    checking EXE
    rebuilding outEXE2.toc because countdown missing
    building EXE from outEXE2.toc
    Appending archive to EXE /home/krishna/countdown/pyinstaller-     1.5.1/countdown/build/pyi.linux2/countdown/countdown
    checking COLLECT
    building because outCOLLECT4.toc missing or bad
    building COLLECT outCOLLECT4.toc

我在使用Tkinter。这会造成任何问题吗?如果Pyinstaller不起作用,那么另一种可用的

在为Makespec.py使用-K选项并使用Build.py跟进后获得的错误消息是

checking Tree
building because outTree4.toc missing or bad
building Tree outTree4.toc
Traceback (most recent call last):
  File "Build.py", line 1494, in <module>
    main(args[0], configfilename=opts.configfile)
  File "Build.py", line 1472, in main
    build(specfile)
  File "Build.py", line 1429, in build
    execfile(spec)
  File "/home/krishna/countdown/pyinstaller-1.5.1/countdown/countdown.spec", line 13, in <module>
    coll = COLLECT(TkTree(), exe,
  File "Build.py", line 1401, in TkTree
    tcltree = Tree(tclroot, tclnm, excludes=['demos','encoding','*.lib'])
  File "Build.py", line 1335, in __init__
    self.__postinit__()
  File "Build.py", line 298, in __postinit__
    self.assemble()
  File "Build.py", line 1374, in assemble
    for fnm in os.listdir(dir):
OSError: [Errno 2] No such file or directory: '/usr/lib/tcl8.5'

1 个答案:

答案 0 :(得分:2)

这是reported issue。 PyInstaller找错了tcl8.5的位置。我的猜测是,并非所有Linux发行版都将tcl保持在同一位置。

一位用户通过这样做解决了错误:

  

对我来说,pyinstaller正在查看/usr/lib/tcl8.5,应该是什么时候   查看/usr/share/tcltk/tcl8.5,当我破解config.dat覆盖此路径时,它可以正常工作

     

使用ubuntu 11.10

另一位用户成功编辑了Configure.py。