【发布时间】:2020-11-30 14:20:36
【问题描述】:
当试图找到一种将我的 python 文件“捆绑”到.exe 的好方法时,我遇到了pyinstaller。我查阅了有关如何使用它的指南,发现了这个guide。我只是使用pip install pyinstaller 安装了pyinstaller,它似乎安装得很好,但是当尝试在控制台中使用pyinstaller 时,它引发了一个错误,说'pyinstaller' is not recognized as an internal or external command, operable program or batch file. 我什至尝试将目录更改为我的文件所在的位置,但它仍然出现同样的错误。当尝试通过 pip 再次安装它时(以防发生一些错误)我收到了这条消息:
Requirement already satisfied: pyinstaller in c:\users\[me]\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (4.1)
Requirement already satisfied: pefile>=2017.8.1; sys_platform == "win32" in c:\users\[me]\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from pyinstaller) (2019.4.18)
Requirement already satisfied: altgraph in c:\users\[me]\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from pyinstaller) (0.17)
Requirement already satisfied: pyinstaller-hooks-contrib>=2020.6 in c:\users\[me]\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from pyinstaller) (2020.10)
Requirement already satisfied: setuptools in c:\program files\windowsapps\pythonsoftwarefoundation.python.3.9_3.9.240.0_x64__qbz5n2kfra8p0\lib\site-packages (from pyinstaller) (49.2.1)
Requirement already satisfied: pywin32-ctypes>=0.2.0; sys_platform == "win32" in c:\users\w[me]\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from pyinstaller) (0.2.0)
Requirement already satisfied: future in c:\users\[me]\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from pefile>=2017.8.1; sys_platform == "win32"->pyinstaller) (0.18.2)
【问题讨论】:
标签: python pip pyinstaller