版权声明: https://blog.csdn.net/sandalphon4869/article/details/88563047
一、基本介绍
PyInstaller库:将.py源代码转换成无需源代码的可执行文件
-官方网站:http://www.pyinstaller.org
-第三方库,使用前需要额外安装
-安装第三方库需要使用pip工具
安装步骤(Windows下):
(1)在cmd命令行输入pip install pyinstaller
(2)需要联网下载
二、使用说明
在cmd命令行下:输入pyinstaller <参数> <文件名.py>
参数:
(1)-h
查看帮助
(2)--clean
清理打包过程中的临时文件
(3)-D,--onedir
默认值,生成dist文件夹
(4)-F,--onefile
在dist文件夹中只生成独立的打包文件
(5)-i <图标文件名.ico>
指定打包程序使用的图标(icon)文件
(6)-F
一般生成
#例1:
pyinstaller -i curve.ico -F SevenDightsDrawV2.py