[英]I can't use pyinstaller
我已经安装了pyinstaller。
pip install pyinstaller
这可能是一个成功的安装。 当我再次运行相同的命令时,这就是我得到的。 黑色标记的区域是个人信息。
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pyinstaller in c:\users\████\appdata\roaming\python\python36\site-packages (4.10)
Requirement already satisfied: altgraph in c:\users\████\appdata\roaming\python\python36\site-packages (from pyinstaller) (0.17.3)
Requirement already satisfied: pyinstaller-hooks-contrib>=2020.6 in c:\users\████\appdata\roaming\python\python36\site-packages (from pyinstaller) (2022.0)
Requirement already satisfied: setuptools in c:\program files\python36\lib\site-packages (from pyinstaller) (40.6.2)
Requirement already satisfied: pefile>=2017.8.1 in c:\users\████\appdata\roaming\python\python36\site-packages (from pyinstaller) (2022.5.30)
Requirement already satisfied: pywin32-ctypes>=0.2.0 in c:\users\████\appdata\roaming\python\python36\site-packages (from pyinstaller) (0.2.0)
Requirement already satisfied: importlib-metadata in c:\users\████\appdata\roaming\python\python36\site-packages (from pyinstaller) (4.8.3)
Requirement already satisfied: future in c:\users\████\appdata\roaming\python\python36\site-packages (from pefile>=2017.8.1->pyinstaller) (0.18.2)
Requirement already satisfied: typing-extensions>=3.6.4 in c:\users\████\appdata\roaming\python\python36\site-packages (from importlib-metadata->pyinstaller) (4.1.1)
Requirement already satisfied: zipp>=0.5 in c:\users\████\appdata\roaming\python\python36\site-packages (from importlib-metadata->pyinstaller) (3.6.0)
当我最终尝试执行 python 应用程序时,它失败了。
首先,我们输入以下命令。
C:\Program Files\Python36>pyinstaller testexe.py --onefile
然后它返回以下内容
'pyinstaller' is not recognized as an internal or external command, an
It is not recognized as an operable program or batch file.
(Original)
'pyinstaller' は、内部コマンドまたは外部コマンド、
操作可能なプログラムまたはバッチ ファイルとして認識されていません。
我没有失败并输入了以下命令。
C:\Program Files\Python36>py -m PyInstaller testexe.py --onefile --windowed
然后它返回以下内容
Unable to create process using 'C:\Users\████\AppData\Local\Programs\Python\Python311\python.exe -m PyInstaller testexe.py --onefile --windowed': ??????????????????
蟒蛇 3.6.1
我更喜欢你试试这个命令:
$ python -m pip install pyinstaller
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.