anacond中找不到sklearn模块

2024-09-23 10:18:59 发布

您现在位置:Python中文网/ 问答频道 /正文

我一直试图导入sklearn,但它说找不到模块。

我的python、numpy、scipy和scikit版本如下,如conda列表所示:

numpy                     1.14.3           py36h9fa60d3_1

python                    3.6.5                h0c2934d_0

scipy                     1.1.0            py36h672f292_0

scikit-learn              0.19.1           py36h53aea1b_0

尝试导入sklearn时出错:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-2-f2461ba6e1e9> in <module>()
----> 1 from sklearn.family import model

ModuleNotFoundError: No module named 'sklearn.family'

我试着用

conda update scikit-learn

conda install scikit-learn

但我得到了以下结果

All requested packages already installed.

那么如何导入sklearn呢?


Tags: 模块版本numpy列表scipysklearnscikitfamily