033 模块4-PyInstaller库的使用


十天快速入门 Python完整教程目录:https://www.cnblogs.com/nickchen121/p/11164387.html

一、PyInstaller库基本介绍

1.1 PyInstaller库概述

将.py源代码转换成无需源代码的可执行文件

PyInstaller库是第三方库

1.2 pip的使用

pip的使用:https://www.cnblogs.com/nickchen121/p/11142580.html

1.3 pip install pyinstaller (cmd命令行)

pip install pyinstaller

二、PyInstaller库使用说明

2.1 简单的使用

(cmd命令行) pyinstaller -F <文件名.py>

2.2 PyInstaller库常用参数

参数 描述
-h 查看帮助
--clean 清理打包过程中的临时文件
-D,--onedir 默认值,生成sist文件夹
-F,--onefile 在dist文件夹中只生成独立的打包文件
-i <图标文件名.ico> 指定打包程序使用的图标(icon)文件

2.3 使用举例

pyinstaller –i curve.ico –F SevenDigitsDrawV2.py

posted @ 2019-07-15 19:04  B站-水论文的程序猿  阅读(750)  评论(0编辑  收藏  举报