安装pyinstaller pip install pyinstaller
pyinstaller官网 http://www.pyinstaller.org
源码:https://github.com/pyinstaller/pyinstaller
pyinstaller -F --icon=myico example.py
#my.ico是图标文件与example.py同目录
如果出错,说明当前pyinstaller不支持你的Python的版本,下载最新的pyinstaller。