ModuleNotFoundError: No module named 'sklearn.impute'
时间:2020-04-26 16:02:14
收藏:0
阅读:602
(~ ̄▽ ̄)~
当我在 jupyter notebook 输入 from sklearn.impute import SimpleImputer 是它报错显示:
ModuleNotFoundError: No module named ‘sklearn.impute‘
原因
- 可能是因为自己的 scikit-learn 库版本太低,需要将其更新到 0.20 版本或以上。
查看安装包
- 在 anaconda prompt 输入
pip list或conda list后回车,可查看已经安装的包。
更新包
- 指定版本更新
pip install --upgrade scikit-learn==0.22.0 -i https://pypi.tuna.tsinghua.edu.cn/simple/
tips:这里使用的是清华镜像源。
安装包
- 倘若没有 scikit-learn 库
pip install scikit-learn -i https://pypi.tuna.tsinghua.edu.cn/simple/
??ヽ(°▽°)ノ?
原文:https://www.cnblogs.com/yang9165/p/12779526.html
评论(0)