我正在尝试使用
pyinstaller
将 .py 文件转换为 .exe 文件,但我收到此警告:
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\kundan\AppData\Roaming\Python\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.
该警告非常具有描述性,尽管您可以忽略它,但为了您的舒适,最好将它们添加到 PATH 中。
为什么?所以你可以直接在cmd中使用pyinstaller(以及其他提到的.exe文件)。
如何?将此文件夹添加到路径
C:\Users\kundan\AppData\Roaming\Python\Python39\Scripts
https://docs.alfresco.com/4.2/tasks/fot-addpath.html
https://bsoyka.medium.com/adding-files-to-the-path-on-windows-10-4fbb4295c549
重新安装Python。在安装程序中选中
Add python.exe to PATH
复选框