ModuleNotFoundError:没有名为“sklearn"的模块 [英] ModuleNotFoundError: No module named 'sklearn'

查看:37
本文介绍了ModuleNotFoundError:没有名为“sklearn"的模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想导入 sklearn 但显然没有模块:

I want to import sklearn but there is no module apparently:

ModuleNotFoundError: No module named 'sklearn'

我正在使用 Anaconda 和 Python 3.6.1;我到处检查,但仍然找不到答案.

I am using Anaconda and Python 3.6.1; I have checked everywhere but still can't find answers.

当我使用命令时:conda install scikit-learn 这不应该只是工作吗?
anaconda 在哪里安装软件包?

When I use the command: conda install scikit-learn should this not just work?
Where does anaconda install the package?

我正在检查我的 python 库中的框架,但没有关于 sklearn 的任何内容,只有 numpy 和 scipy.

I was checking the frameworks in my python library and there was nothing about sklearn only numpy and scipy.

请帮忙,我是使用 python 包的新手,尤其是通过 anaconda.

Please help, I am new to using python packages especially via anaconda.

推荐答案

您可以只使用 pip 来安装软件包,即使您使用的是 anaconda:

You can just use pip for installing packages, even when you are using anaconda:

pip install -U scikit-learn scipy matplotlib

这应该适用于安装包.

对于 Python 3.x 只需使用 pip3:

pip3 install -U scikit-learn scipy matplotlib

这篇关于ModuleNotFoundError:没有名为“sklearn"的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆