錯誤解決:ModuleNotFoundError: No module named 'keras_contrib'


本人所使用環境:

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

此方法在我的環境下成功執行!

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM