pyinstaller
注意事项:
- 打包时,创建新的环境
- 尽可能在使用的电脑上进行打包
打包标准化流程
# 1、安装 minicondahttps://docs.conda.io/en/latest/miniconda.html# 2、创建新的虚拟环境conda create -n env_name python=3.6# 3、将所需要的包写进 requirement.txt# 4、配置 python 环境,pip install -r requirement.txt# 5、打包pyinstaller -F -w xxx.py -i logo.icohttps://www.pyinstaller.org/https://pyinstaller.readthedocs.io/en/stable/usage.html"""-F:打包 Python 程序为单个可执行文件-D:打包 Python 程序为一个文件夹-i:生成图标,只适用于 Windows 平台-n:指定打包后生成文件的名称-w:禁止命令行弹出"""
nuitka
https://github.com/lxfly2000/7zsfx/releases
nuitka --mingw64 --standalone --show-progress --nofollow-imports --plugin-enable=pylint-warnings --output-dir=out 程序.py
