使用PyInstaller打包Python应用

PyInstaller安装

bash 复制代码
pip install pyinstaller

PyInstaller使用

打包时常用参数如下表所示:

可选参数 含义
-F 打包 Python 程序为单个可执行文件
-D 打包 Python 程序为一个文件夹
-i 生成图标,只适用于 Windows 平台
-n 指定打包后生成文件的名称
-w 禁止命令行弹出

常用命令

打包单个不带命令行的文件

bash 复制代码
 pyinstaller -wF <python文件名>
相关推荐
电商API&Tina29 分钟前
电商数据采集API接口||合规优先、稳定高效、数据精准
java·javascript·数据库·python·json
玲娜贝儿--努力学习买大鸡腿版42 分钟前
hot 100 刷题记录(1)
数据结构·python·算法
兮℡檬,1 小时前
答题卡识别判卷
开发语言·python·计算机视觉
阆遤1 小时前
利用TRAE对nanobot进行安全分析并优化
python·安全·ai·trae·nanobot
雕刻刀2 小时前
ERROR: Failed to build ‘natten‘ when getting requirements to build wheel
开发语言·python
何双新2 小时前
Odoo 技术演进全解析:从 Widget 到 Owl,从 Old API 到声明式 ORM
python
山川行2 小时前
关于《项目C语言》专栏的总结
c语言·开发语言·数据结构·vscode·python·算法·visual studio code
星辰徐哥2 小时前
C语言游戏开发:Pygame、SDL、OpenGL深度解析
c语言·python·pygame
xcLeigh2 小时前
Python入门:Python3基础练习题详解,从入门到熟练的 25 个实例(六)
开发语言·python·教程·python3·练习题
不懒不懒2 小时前
安装python3.9.7和pycharm-community-2022.3.2.exe以及linux
linux·ide·python·pycharm