上篇寫了一個定時關機的軟體
https://blog.csdn.net/qq_33289175/article/details/87300783
這次将它達成exe包,這樣就可以在沒有安裝python的環境下使用
1、找到python檔案路徑
如果你是使用pycharm,可以如下操作找到python檔案路徑
否則,請自行尋找
2、使用win+r組合鍵打開終端
運作pip install pyinstaller
安裝完成
3、cd到自己要釋出的工程下
輸入指令 pyinstaller --console --onefile 定時關機.py
4、生成成功,在工程目錄下有一個dist檔案夾
裡面有exe檔案