python文件打包技术
一,安装第三方包:pyinstaller
1、下载pyinstaller
pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz
2、安装pyinstaller
pip install pyinstaller
3、更新pyinstaller
pip install --upgrade pyinstaller
二,一行命令打包python文件
1、拷贝.py文件和.ico文件到test文件夹下。
2、 进入运行窗口(Windows+R,输入cmd)。 cd到test文件夹下,执行
pyinstaller -F -i xx.ico xx.py
命令。
3、 留意exe文件生成位置 ,一般在当前目录下的dist文件夹下面。
tip:ico文件下载或生成网站: https://www.easyicon.net/