scikit-learn - jupyter notebook 中没有名为 sklearn.model_selection 的模块

标签 scikit-learn jupyter-notebook

我在环境中安装了sklearn包
enter image description here
我可以在终止时成功导入 sklearn。
enter image description here
但是当我运行 boston_housing.ipynb 的项目时,我得到了 ImportError: No module named sklearn.model_selection
enter image description here
我该如何解决这个问题?

最佳答案

正如desertnaut 所说,您使用的是Python 2,但conda list命令显示为 Python 3 安装的软件包。在您 source activate py2 之后运行 conda list再次命令并检查 scikit-learn。如果没有列出,您可以简单地使用 conda install scikit-learn 安装它。 .在每个 conda 环境中,您必须单独安装软件包。

关于scikit-learn - jupyter notebook 中没有名为 sklearn.model_selection 的模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48720840/

相关文章:

python - 机器学习sklearn中的海量数据集

python - 是否有可能对 Python 库中的类进行完全猴子修补?

Python sklearn : why are my neighbors. KNeighborsRegressor 预测 "perfect"?

python - How to edit markdown cell in jupyter-notebook (Could not edit markdown cell in Jupyter notebook)

jupyter-notebook - 如何使用 Julia 在 Jupyter Notebook 中显示 (224, 224, 3) 图像?

python - 上采样不平衡数据集的小类

python - 使用 sklearn 如何计算文档和查询之间的 tf-idf 余弦相似度?

python - 使用 iPython 内联图的 SVG 渲染问题

python-3.x - 无法在jupyternotebook(或jupyterlab session )中更改目录(shell命令)

python - Bash 命令不会在 Jupyter Notebook 中执行