# Python pyinstaller打包exe # Python pyinstaller打包exe ## 安装 pyinstaller ```shell pip install pyinstaller ``` 检查是否安装 ```shell pyinstaller --version ``` ​ ## 打包 ``` pyinstaller -i ".\favicon.ico" -w -F .\payload_原版.py ``` - `-i ".\favicon.ico"`:指定生成的可执行文件的图标为当前目录下的 `favicon.ico` 文件。 - `-w`:指定生成的可执行文件不显示命令行窗口。 - `-F`:生成单个可执行文件。