pyinstaller - python 脚本打包成 exe
安装
pip install pyinstaller打包单文件
进入 a.py 文件所在目录下执行:
sh
Pyinstaller -F a.py在 a.py 同级目录下,生成 dist/a.exe
- 相关命令
# 打包exe
Pyinstaller -F a.py
# 不带控制台的打包
Pyinstaller -F -w a.py
# 打包指定exe图标打包 tb是图标文件名
Pyinstaller -F -w -i tb.ico a.py这里就给大家分享一个网站,可以把其他格式图片转成ico格式:https://app.xunjiepdf.com/img2icon/
打包多文件
todo 待完善