使用到工具pyinstaller
pip install pyinstaller
使用指令打包,其中xxx.ico为需要的图标,xxx.py为要打包的py文件
pyinstaller -w --icon xxx.ico --onefile xxx.py
pip install pyinstaller
pyinstaller -w --icon xxx.ico --onefile xxx.py
转载于:https://www.cnblogs.com/Mysterious/p/7624724.html