python - Py 安装程序 "ImportError: No module named Pyinstaller"

标签 python pyinstaller

这是我运行 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。这是 PyInstaller 2.0,您可以找到/pyinstaller-2.0 和/pyinstaller-2.0/PyInstaller 目录内部的一些屏幕 herehere , 分别。

有没有人知道这是怎么回事?我尝试将/pyinstaller-2.0 目录中的 pyinstaller.py 文件复制到/pyinstaller-2.0/PyInstaller 目录中,但我没有成功。

这可能会被证明是一些简单得可笑的修复程序,但是......它让我感到难过。如果需要任何更多信息,请尽管询问,我会尽力提供。

最佳答案

使用 PyInstaller 2.0,您不需要运行配置文件或 pyinstaller 文件。 (阅读安装文件附带的 PyInstaller 2.0 文档。)

构建您的项目;在/your/path/to/pyinstaller/目录中,只需运行:

“python pyinstaller.py [选择] yourprogram.py”

关于python - Py 安装程序 "ImportError: No module named Pyinstaller",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11953618/

相关文章:

python - 通过Windows cmd在Anaconda环境中运行python脚本

python - 加载 Python lib pyinstaller 时出错(不同尝试的详细描述)

python - 表达式中的变量赋值

python - 如何返回一个串联的元组?

python - 在 python Pandas 中绘制来自更多不同数据帧的堆积条

python - 验证棉花糖中的可选字段

python - 如何更新 PyInstaller 生成的 exe 详细信息?

python - PyPandoc 与 PyInstaller 结合使用

python - 如何通过pyinstaller在可执行文件中包含json

python - 在 python 日志记录配置文件中使用程序变量