1.安装pyinstaller

pyinstaller打包python成exe文件

2.准备需要打包的.py文件

pyinstaller打包python成exe文件

其中input()可以避免程序闪退

3.打包

1).cmd

2).通过cd进入pyinstaller.exe所在目录

pyinstaller打包python成exe文件

pyinstaller打包python成exe文件

3).

pyinstaller打包python成exe文件

4).

pyinstaller打包python成exe文件

5).打包的exe文件地址

pyinstaller打包python成exe文件

6).展示结果

pyinstaller打包python成exe文件


总结,这是最简单的python打包案例,后面会不断的进行完善总结更多的打包方面经验。

相关文章: