1. 安装 pyinstaller 库 2. 在需要生成exe文件的程序文件下,打开管理员窗口 3.pyinstaller -F filename 即可生成dist 文件,文件夹内就是所生成的exe文件