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

查看:114
本文介绍了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.

推荐答案

即使使用 anaconda ,您也可以仅使用pip来安装软件包:

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天全站免登陆