- Changing the download source to a domestic source can improve the slow download speed of third-party packages. For details on how to modify the conda download source, see: https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/
- Create a new environment in the base environment
- conda env list #View environment
- switch to new environment
- Install pillow and pyinstaller packages in the new environment
conda install pillow conda install pyinstaller
- Other packages required to install applications in the new environment, taking pygame as an example
conda install pygame 或 pip3 install pygame
7. Enter the folder where the program is located and package the program with pyinstaller
pyinstaller -F xxxx.py
For example, if your python program is music_player.py, the command to turn the python program into an executable file is
pyinstaller -F music_player.py
After packaging with pyinstaller, an executable program named music_player.exe will be generated in the dist folder.