PyInstaller问题,在构建之后没有运行

时间:2015-09-07 10:54:54

标签: python wxpython pyinstaller

我有一个wx Python程序,我试图用PyInstaller构建一个.exe。我已经安装了Pywin32和Pyinstaller,我已经使用下面的两个来打包Python文件。

pyinstaller andro.py

pyinstaller -F andro.py

双击时,两个.exe文件都会短暂闪烁一个cmd框,然后消失。

尝试从cmd运行这两个错误:

 Traceback (most recent call last):
  File "<string>", line 1737, in <module>
 File "c:\pentesting\andro\build\andro\out00-PYZ.pyz\wx._core", line 8628, in __in
it__
 File "c:\pentesting\andro\build\andro\out00-PYZ.pyz\wx._core", line 8196, in _BootstrapApp
 File "<string>", line 1732, in OnInit
 File "<string>", line 298, in __init__
 File "<string>", line 308, in startConf
 File "<string>", line 835, in deviceExists
 File "c:\pentesting\andro\build\andro\out00-PYZ.pyz\subprocess", line 710, in __i
nit__
 File "c:\pentesting\andro\build\andro\out00-PYZ.pyz\subprocess", line 958, in _execute_child
   WindowsError: [Error 2] The system cannot find the file specified

第1732行是:

 frame = Main(None, -1, 'Andro') 

第298行是:

 self.startConf()

308行是:

 stdout = self.deviceExists()

第835行是:

p = Popen(params, shell=False, stdout=subprocess.PIPE)

在跟踪之后,它们都会导致deviceExists()函数,特别是第835行,'p = Popen'行:

def deviceExists(self):
    params = [toolsDir + "\\adb.exe", "devices"]
    p = Popen(params, shell=False, stdout=subprocess.PIPE)
    stdout, stderr = p.communicate()
    return stdout

该程序从cmd,python andro.py启动时运行正常,因此不确定问题,是否有人能够提供任何想法?

0 个答案:

没有答案