【发布时间】:2021-09-28 20:48:04
【问题描述】:
我使用 pyinstaller 从我的 .py 文件创建一个 exe。
从一秒钟到另一秒钟,它开始无法正常工作。当我安装 pyinstaller 时,会出现下一个警告:
WARNING: The scripts pyi-archive_viewer.exe, pyi-bindepend.exe, pyi-grab_version.exe, pyi-makespec.exe, pyi-set_version.exe and pyinstaller.exe are installed in 'C:\Users\gergr\AppData\Local\Packages\PythonSoftwareFoundation.Python.3
.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
当我尝试将其创建为 exe 时,就会出现 ext:
pyinstaller : The term 'pyinstaller' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ pyinstaller --onefile main.py
+ ~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (pyinstaller:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
有人知道这是什么吗?
【问题讨论】:
标签: python pycharm pyinstaller