from sklearn.externals import joblib ImportError: cannot import name ‘joblib‘


pip install Scikit-learn==0.20.4

 

from sklearn.externals import joblib ImportError: cannot import name ‘joblib’

在機器學習中,有時需要保存或加載模型,就會引入from sklearn.externals import joblib。但是大多數參考的文章時間太久,而sklearn.externals.joblib在0.21中已棄用,在0.23中被刪除。故因為scikit-learn版本問題,運行時會出現報錯:from sklearn.externals import joblib ImportError: cannot import name 'joblib'

 

解決方法:1.卸載安裝的 sklearn scikit-learn joblib

pip uninstall joblib scikit-leran sklearn

 

 

 

2.重新安裝scikit-learn,我安裝的版本是0.20.4

 

 

pip install Scikit-learn==0.20.4

這是Scikit-learn的可用文檔(Scikit-learn版本)

 

 原文:https://blog.csdn.net/aclplr/article/details/107183926

 


免責聲明!

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



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