1、通过PyInstaller库实现;
pip install pyinstaller # 在terminal终端中执行命令 pyinstaller 词云生成.py pyinstaller -F 词云生成.py #python源文件生成一个独立的可执行文件。
2、指定打包程序使用的图标 ,格式只能为.ico 通过工具(比特虫)进行转换
pyinstaller -F practice.py -i yu.ico