python3打包exe

python3项目打包成exe可执行程序

使用pyinstaller将python文件打包成exe程序,打包步骤如下:

一、安装pyinstaller

(1)win+R输入cmd,打开命令窗口

img

img

(2)安装pyinstaller,安装指令:pip install pyinstaller

img

二、打包

1,切换到打包程序目录

例:需要打包程序目录为:D:\automation\autotest_tool\interface_param_change_tool

切换指令:cd D:\automation\autotest_tool\interface_param_change_tool

img

2,打包文件,pyinstaller -F xxx.py(xxx.py,打包的文件)

例,打包文件为:runer.py

img

img

3,到打包文件目录查看打包好的程序,并执行

(1)打包成功后项目中新增dist文件

img

(2)进入dist文件,点击运行打包好的exe程序

img

原文链接:https://www.cnblogs.com/mini-monkey/p/11195309.html

posted @ 2020-10-14 09:46  沐雨辰沨  阅读(359)  评论(0编辑  收藏  举报