ModuleNotFoundError:没有名为"sklearn.utils._joblib"的模块 [英] ModuleNotFoundError: No module named 'sklearn.utils._joblib'
本文介绍了ModuleNotFoundError:没有名为"sklearn.utils._joblib"的模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Anaconda Jupyter笔记本平台上使用python 3.6.我的电脑使用win 8.1作为操作系统.
I'm using python 3.6 on on Anaconda Jupyter notebooks platform. My pc uses win 8.1 as OS.
我正尝试使用以下几行从sklearn导入PCA:
I was trying to import PCA from sklearn using the following lines:
import sklearn
from sklearn import decomposition
from sklearn.decomposition import PCA
第三行返回模块错误:ModuleNotFoundError: No module named 'sklearn.utils._joblib'
the third line returns a Module error: ModuleNotFoundError: No module named 'sklearn.utils._joblib'
奇怪的是,我找不到此错误的任何记录在线!我将不胜感激.我在下面复制了完整的错误消息:
Strangely, I couldn't find any record on this error online! I'd appreciate any help. I copied the complete error message below:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-375-2e95ea83a366> in <module>()
1 import sklearn
----> 2 from sklearn import decomposition
3 from sklearn.decomposition import PCA
4 # Make an instance of the Model
5 pca = PCA(.95)
E:\Anaconda3\lib\site-packages\sklearn\decomposition\__init__.py in <module>()
9 from .incremental_pca import IncrementalPCA
10 from .kernel_pca import KernelPCA
---> 11 from .sparse_pca import SparsePCA, MiniBatchSparsePCA
12 from .truncated_svd import TruncatedSVD
13 from .fastica_ import FastICA, fastica
E:\Anaconda3\lib\site-packages\sklearn\decomposition\sparse_pca.py in <module>()
11 from ..linear_model import ridge_regression
12 from ..base import BaseEstimator, TransformerMixin
---> 13 from .dict_learning import dict_learning, dict_learning_online
14
15
E:\Anaconda3\lib\site-packages\sklearn\decomposition\dict_learning.py in <module>()
15
16 from ..base import BaseEstimator, TransformerMixin
---> 17 from ..utils._joblib import Parallel, delayed, effective_n_jobs
18 from ..externals.six.moves import zip
19 from ..utils import (check_array, check_random_state, gen_even_slices,
ModuleNotFoundError: No module named 'sklearn.utils._joblib'
推荐答案
从2019年6月开始, sklearn.utils._joblib
不再是一个东西.
As of June 2019, sklearn.utils._joblib
is no longer a thing.
查看全文