pyinstaller打包python文件成exe文件,安装及使用教程 亲测python3.5可用

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/Clannad_niu/article/details/83790443

0x01 pyinstaller安装

经过测试,用pip安装的pyinstaller经常出问题,尤其在打包几次以后,在网上查询以后发现是pyinstaller的版本问题,为了更好适应python3.5,需要下载更好的pyinstaller

连接:https://pan.baidu.com/s/1MpVhwMNEVL7k9rv6KjmWnA

提取码:dgso

将下载好的压缩文件解压,并通过指令 python setu.py install 安装即可

0x02 使用教程

在命令行中cd到安装好的pyinstaller目录下

通过命令   pyinstaller -F -w -i xxx.ico   xxxx.py 完成打包安装

其中 -w 表示运行生成的exe时不会有黑色的调试窗口弹出 为可选参数

-i 为生成的exe文件的图标,可以通过python代码生成ico文件来打包,也为可选参数

-F为必选参数

猜你喜欢

转载自blog.csdn.net/Clannad_niu/article/details/83790443