一、安装 pip install PyInstaller 二、指定路径 pyinstaller -F xxx.py --distpath=xxx\ xxx.py:要打包的 .py 文件 xxx\:指定路径