參考:https://blog.csdn.net/kun_dl/article/details/81223732
pip install cx-freeze
如果當前環境配置的是Anaconda3 就在截圖這個地方執行,這個地方和命令行的對話框是一樣的 安裝的東西會直接和當前配置的環境關聯
安裝後Anaconda3的script目錄下會有三個文件
然後切換到這個目錄下執行:python cxfreeze-postinstall
打包指令:
cxfreeze D:\Kaggle\company\Release_3\img_stitching
_para_test.py --target-dir D:\Kaggle\company\11
遇到的錯誤::
cx_freeze importError:numpy.core.umath to import
ImportError: numpy.core.multiarray failed to import
解決方法是更新numpy :pip install -U numpy,然後添加:
import numpy.core._methods
import numpy.lib.format