2014-11-23 130 views
1

我想使用PyInstaller打包测试Python项目。完整的源文件可在https://github.com/xilanma/ohohPyInstaller找不到模块

它所做的只是导入aes和ecdsa模块。当试图打包在Windows上使用PyInstaller,它生成.exe文件,但是当我启动的。exe,我得到以下错误:

C:\Users\ixcoin\dev\ohoh\dist>ohoh.exe 
trying to import aes 
Traceback (most recent call last): 
    File "<string>", line 4, in <module> 
ImportError: No module named aes 

完整的日志,请https://github.com/xilanma/ohoh/blob/master/README.md#some-logs

有谁知道解决这个问题?我正在VirtualBox中使用Windows 7 x86进行测试。

回答

0

我有一个类似的问题,当使用导入PyOpenSSL时无法导入AES。 AES是一个隐藏的导入,pyinstaller不断丢失。这个google groups post使我找到了使用PyInstaller的develop分支的解决方案。隐藏的导入文件已包含在此分支中,可以找到AES并包含它。

我通过下载develop分支的zip并解压它来做到这一点。 PyInstaller然后可以用下面的命令用来:

python pyinstaller.py C:\path\to\my\script.py 

所有附带PIP包的命令可与上面的命令中使用。

我希望有帮助。