返回顶部

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

 

posted @ 2020-07-09 15:13  fen斗  阅读(4878)  评论(0编辑  收藏  举报