这是我运行python configure.py时生成的代码。
dan@Q430-Q530:~/pyinstaller-2.0/PyInstaller$ python configure.py
Traceback (most recent call last):
File "configure.py", line 28, in <module>
from PyInstaller import HOMEPATH, PLATFORM
ImportError: No module named PyInstaller所以,目前,我甚至无法运行PyInstaller,因为缺少一个名为...的模块。PyInstaller。这是PyInstaller2.0,您可以分别在/ PyInstaller -2.0和/pyinstaller-2.0/PyInstaller目录here和here的内部找到一些屏幕。
这里有谁知道发生了什么事吗?我尝试将/pyinstaller2.0目录中的pyinstaller.py文件复制到/pyinstaller2.0/PyInstaller目录中,但没有成功。
这可能会被证明是非常简单的修复方法,但是...我被难住了。如果需要更多的信息,尽管问,我会尽力提供的。
发布于 2012-10-20 02:38:28
使用PyInstaller 2.0,您不需要运行配置或pyinstaller文件。(请阅读安装文件附带的PyInstaller 2.0文档。)
在/ your /path/ To /pyinstaller/目录中,只需运行:
"python pyinstaller.py选择yourprogram.py“
发布于 2012-09-10 23:22:24
我不认为configure.py、makespec.py和build.py文件应该直接在PyInstaller 2.0中运行。
在下载中,顶层有一个pyinstaller.py文件-运行该文件。
发布于 2012-08-14 22:05:23
看起来像是configure.py期望.在你的PYTHONPATH上。您应该能够在/pyinstaller-2.0和import PyInstaller中运行python。这应该会失败,就像在脚本中一样。您可以将.添加到~/.bashrc中的环境变量中(确保获取它的源代码或启动一个新的终端会话以获得更改)。这将类似于:
export PYTHONPATH=.:$PYTHONPATH或者,您可以在配置脚本的顶部添加:
import sys
sys.path.append('.')无论采用哪种方法,您都应该能够在/pyinstaller-2.0中运行脚本并导入PyInstaller模块。
https://stackoverflow.com/questions/11953618
复制相似问题