因为工作上可能需要把py变成exe的状况,
开始研究起pyinstaller的用法,但还没开始就先卡在安装的关卡
总之先打开cmd,
1.用path检查过python的script是否有在环境变数中,看起来是有的。
2.用网路说的,将pip装好的pyinstaller.exe複製并放进其中一个环境变数的资料夹内后,总算开始有点变化。
虽然还是跳了异常,但最后面的???的字串让人觉得可疑。C:\Windows\System32>pyinstaller Fatal error in launcher: Unable to create process using '"C:\Program Files\Python311\python.exe" "C:\Users\*\AppData\Local\Programs\Python\Python311\pyinstaller.exe" ': ???????????
用了pyinstaller --version
也会跳一样的状况。怀疑是程式有异常。
最后是用pip uninstall pyinstaller后,再重新安装一次就正常了。
<版本参考>
pip --version
23.2.1
pyinstaller --version
5.13.0