python - PyInstaller 使用 pip 安装了 'successfully' 但找不到 pyinstaller.py

标签 python python-3.x pip pyinstaller

我在 Windows 上运行 Python 3.5.3,并尝试使用 pip 安装 Pyinstaller。它似乎有效 - 没有错误或任何东西,非常简单,就像 pip 一样。

我尝试了 import -m pyinstaller 但它说该模块不存在,所以我按照文档所述检查了安装文件夹 you should be able to use pyinstaller.py directly from the install location.

Here这是该位置的图片,pyinstaller.py 不在那里!它也不位于任何子文件夹或其他文件夹中。我想我只是错过了一些明显的东西,但经过一个小时的卸载和重新安装所有内容后,如果有人能帮助我,我将不胜感激。谢谢!

最佳答案

为什么要导入?您应该直接在控制台上运行 pyinstaller:

pyinstaller --onedir your_app_main.py

pyinstaller --onefile your_app_main.py

查看此 PyInstaller 手册: https://pyinstaller.readthedocs.io/en/stable/

关于python - PyInstaller 使用 pip 安装了 'successfully' 但找不到 pyinstaller.py,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43976096/

相关文章:

python - 连接一个 dask 数据框和一个 pandas 数据框

python - 无法弄清楚如何使用表达式在 Python 中验证加拿大邮政编码

python - 在 iPython 中使用星号 (*)

python - 如何在具有2个版本的python的计算机上设置已安装模块的路径

python - 一次安装三个软件包失败 : "pip install numpy pil aptus" but individually they work, 为什么?

python - 导入Python模块可以在解释器中工作,但不能在脚本中工作

Python:分解字符串并将其附加到列表的更有效方法

python - 根据给定索引交换两个列表的值

python - “异常”对象不可调用

Python 3.8 - 软件包版本已损坏,但在本地安装时可以工作