使用軟件
PyInstaller(http://www.pyinstaller.org)
安裝方法
#使用pip命令進行安裝
pip install pyinstaller
執行命令
#在腳本所在目錄執行下面的命令
pyinstaller --console --onefile yourprogram.py
#執行上面命令后,exe文件會被放到新生成的子目錄dist中
附錄
詳細的pyinstaller使用手冊:https://pyinstaller.readthedocs.io/en/stable/