說在前頭,能用pyinstaller不用cxfreeeze,cxfreeeze打包出來的東西太大
pyinstaller
下載
pip install pyinstaller
pip install pywin32 依賴
打包方法
pyinstaller a.py
坐等。。。
如果發生****deepth的錯誤
刪除dist 和 build 文件
保留***。spec的文件
然後打開他,在上面寫
import sys
sys.setrecursionlimit(5000)
然後pyinstaller ***.spec
坐等
cxfreeze
安裝
pip install cx-freeze
然後在你安裝的python的目錄下有個
Scripts目錄,進入它。
然後執行
python cxfreeze-postinstall
然後
在cmd中輸入
cxfreeze -h驗證
打包方法
cxfreeze a.py --target-dir E:/123
a.py是你的程序,-f 後頭是保存的地方