python利用pyinstaller打包生成exe

Posted 莫贞俊晗

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python利用pyinstaller打包生成exe相关的知识,希望对你有一定的参考价值。

1.安装pyinstaller

pip install pyinstaller 是最简单的安装方式

2.要打包的文件目录下,并执行命令

允许一个文件
pyinstaller.exe -F .\\ 要打包的py文件

pyinstaller.exe -F .\\wei_dian_vbuyCreateOrder.py

利用pyinstaller 打包Python文件

1.下载安装pyinstaller模块

  cmd 命令: pip install pyinstaller

  cmd命令: pip list

  查看自己安装的模块

  

2.建议把要大包的Python文件单独放到新建文件夹里

  cmd命令:pyinstaller -F 要打包的文件名.py

3.找到EXE文件:

在dist文件里就是打包生成的EXE文件;

 

以上是关于python利用pyinstaller打包生成exe的主要内容,如果未能解决你的问题,请参考以下文章

Python利用pyinstaller工具将py文件打包成.exe可执行文件

pyinstaller打包exe文件太大,利用pipenv轻松解决

Python执行pyinstaller打包生成的exe文件实战

python3.6.2利用pyinstaller发布EXE

pyinstaller打包生成的exe文件并使用python终止后台的exe程序运行

利用pyinstaller将python脚本打包发布