python生成exe文件的方法:首先安装pyinstaller,代码为【pip install pyinstaller】;然后使用pyinstaller命令打包成exe【pyinstaller -F --icon=my.ico..】。

本教程操作环境:windows7系统、python3.9版,DELL G3电脑。
python生成exe文件的方法:
一、安装 pyinstaller
pip install pyinstaller
二、使用 pyinstaller 命令
立即学习“Python免费学习笔记(深入)”;
pyinstaller -F --icon=my.ico test.py #打包成exe,并设置图标
pyinstaller -F -w yourfilename.py #打包成exe,且不包含控制台
其他参数:

一般 python GUI编程才用到 打包成exe,讲道理不如.net 的winform好使
相关免费学习推荐:python视频教程











