用pyinstaller包装winpexpect

时间:2013-09-24 04:19:41

标签: python pyinstaller software-packaging

我试图用pyinstaller创建一个非常基本的可执行文件,但是当我运行它时,winpexpect(一个windows版本的pexpect)会给我一个非常难以理解的错误。我真的只能推断出使用winspawn类时会发生错误。

C:\Users\Dan\Dropbox\Programming\Python\MC\ServerSense>ServerSense.exe
Traceback (most recent call last):
  File "<string>", line 170, in <module>
  File "<string>", line 52, in __init__
  File "C:\Users\Dan\Dropbox\Programming\Python\Packagers\PyInstaller\PyInstalle
r-2.1\ServerSense\build\ServerSense\out00-PYZ.pyz\winpexpect", line 346, in __in
it__
  File "C:\Users\Dan\Dropbox\Programming\Python\Packagers\PyInstaller\PyInstalle
r-2.1\ServerSense\build\ServerSense\out00-PYZ.pyz\pexpect", line 429, in __init_
_
  File "C:\Users\Dan\Dropbox\Programming\Python\Packagers\PyInstaller\PyInstalle
r-2.1\ServerSense\build\ServerSense\out00-PYZ.pyz\winpexpect", line 401, in _spa
wn
pywintypes.error: (2, 'CreateProcess', 'The system cannot find the file specifie
d.')

任何人都可以提供一些有关如何使用pyinstaller打包winpexpect的见解吗?它似乎甚至不让我知道它找不到哪个文件。

1 个答案:

答案 0 :(得分:0)

想出来,我在这里使用了winpexpect的分支:https://bitbucket.org/weyou/winpexpect/wiki/Home

哪个有cx_freeze支持,(py2exe也可以,这就是我使用的。)