[英]how to import sklearn.impute on jupyter NoteBook?
在 jupyter 中从 sklearn 导入 impute 模块时遇到问题:
从 sklearn.impute 导入 SimpleImpute
到目前为止,我已经尝试了所有解决方案,安装了最新版本的 sklearn(0.23.1) 和 jupyter(6.0.3) 笔记本,但仍然出现相同的错误
ModuleNotFoundError:没有名为“sklearn.impute”的模块
我已经在 IDLE 上尝试过相同的代码,问题出在 jupyter 上没问题
我该如何解决这个问题?
在 jupyter-notebook 中运行以下命令,并验证版本0.23
的scikit-learn
是否在列表中。 如果它不在列表中,则意味着您的 IDLE 和 jupyter-notebook 正在使用不同的 python 安装。 (因为它在 IDLE 中工作)
!pip list
如果列表中缺少它,则使用 jupyter-notebook 直接安装它
!pip install --upgrade scikit-learn
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.