4.5.3. PyInstaller
4.5.3.1. 安装
$ pip install pyinstaller
$ conda install pyinstaller
4.5.3.2. 生成配置文件
$ pyi-makespec --onefile quickstart.py
注解
--onefile
参数主要是说明生成的可执行文件是一个单个可执行文件。
该命令会生成一个quickstart.spec的文件,该文件描述了如何打包
4.5.3.3. 打包
$ pyinstaller quickstart.spec