使用软件
PyInstaller(http://www.pyinstaller.org)
安装方法
#使用pip命令进行安装
pip install pyinstaller
执行命令
#在脚本所在目录执行下面的命令
pyinstaller --console --onefile yourprogram.py
#执行上面命令后,exe文件会被放到新生成的子目录dist中
附录
详细的pyinstaller使用手册:https://pyinstaller.readthedocs.io/en/stable/