找回密码
 立即注册
搜索
到手67.99元!阿里云轻量2核2G云服务器
查看: 16|回复: 0

pyinstaller打包exe

[复制链接]

696

主题

0

回帖

11

积分

管理员

积分
11
发表于 2026-5-23 10:34:45 | 显示全部楼层 |阅读模式
pyinstaller官网
参数 描述
-h 查看帮助
--clean 清理打包过程中的临时文件
-D, --onedir 默认值,生成dist文件夹
-F, --onefile 在dist文件夹中只生成独立的打包文件
-i <图标文件名.ico> 指定打包程序使用的图标(icon)文件
--windowed 生成一个无命令行窗口的GUI应用程序。它会在后台运行,不会打开控制台窗口
-n,--name 指定生成的可执行文件的名称
--add-data source:dest Additional data files or directories containing data files to be added to the application. The argument value should be in form of “source:dest_dir”, where source is the path to file     (or directory) to be collected, dest_dir is the destination directory relative to the top-level application directory, and both paths are separated by a colon (. To put a file in the top-level application directory, use . as a dest_dir. This option can be used multiple times.
-p,--paths A path to search for imports (like using PYTHONPATH). Multiple paths are allowed, separated by ':', or use this option multiple times. Equivalent to supplying  the pathex argument in the spec file.
         
示例:pyinstaller -i icon.ico -F test.py --paths ***\site-packages\pandas,xlwings --clean

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|skypiea

GMT+8, 2026-6-27 05:08 , Processed in 0.040040 second(s), 20 queries .

Powered by skypiea

快速回复 返回顶部 返回列表