本人所使用環境:
tensorflow 2.3.1
keras 2.4.3
python 3.6
今天整理了一下電腦中的虛擬環境,在安裝 "keras_contrib" 總是出錯,特此寫下三種解決方法:
1、pip install keras_contrib
方法 1 可能會報錯:
ERROR: Could not find a version that satisfies the requirement keras_contrib (from versions: none) ERROR: No matching distribution found for keras_contrib
那么請看方法 2: 直接從 github 中進行下載。
pip install git+https://www.github.com/keras-team/keras-contrib.git
此方法是網上最普遍的方法,但可能因為服務器的原因,一直報如下錯誤:
ERROR: Command errored out with exit status 128:
那么請看方法 3: 將方法 2 中的 https 換成 git!
pip install git+git://www.github.com/keras-team/keras-contrib.git
此方法在我的環境下成功執行!