pyinstaller multi-python version solution

stackflow original post

If there are multiple pythons on the computer (my computer has python310 and 37), it will cause errors in the range of references and searched libraries in the environment variables of pyinstaller.

Using the following commands may or may not work. For specific reasons, please refer to
what does the python -m command mean.
py -3.8 -m PyInstaller xxxx.py
The correct solution is:
1. Package in a virtual environment
2. Package directly with the absolute path of the specified python version of pyinstaller, such asC:\Python37\Scripts\pyinstaller.exe -F xxx.py

Guess you like

Origin blog.csdn.net/weixin_45518621/article/details/126450507