使用tensorflow.keras中的save_model時,發生錯誤
ImportError: `save_model` requires h5py
追蹤了下是因爲h5py無法導入,cmd裏測試可以導入,但是在python IDE裏失敗,錯誤爲:
ImportError: DLL load failed: The specified module could not be found.
再追蹤
ImportError: cannot import name _errors
,問題出在/h5py/__init__.py中的
from . import _errors
解決方案:手動pip安裝h5py (原h5py是conda安裝的)
pip uninstall h5py
pip install h5py