Python 之pyinstaller模块打包成exe文件

1、安装pyinstallerpython

pip install pyinstaller

 

 2、下载安装pyinstaler运行时所须要的windows扩展pywin32git

https://github.com/mhammond/pywin32/releasesgithub

3、打包exe程序windows

icon制做网址:http://www.bitbug.net/spa

pyinstaller -F -w -i G:/记事本/icon.ico ./miniText.py

 

参数含义:.net

-F  指定打包后只生成一个exe格式的文件(建议写上这个参数)blog

-D  –onedir 建立一个目录,包含exe文件,但会依赖不少文件(默认选项)ip

-c  –console, –nowindowed 使用控制台,无界面(默认)get

-w  –windowed, –noconsole 使用窗口,无控制台it

-p  添加搜索路径,让其找到对应的库。

-i  改变生成程序的icon图标

相关文章
相关标签/搜索