I'm using python 3.6 on on Anaconda Jupyter notebooks platform. My pc uses win 8.1 as OS.
I was trying to import PCA from sklearn using the following lines:
import sklearn
from sklearn import decomposition
from sklearn.decomposition import PCA
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:Anaconda3libsite-packagessklearndecomposition\__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:Anaconda3libsite-packagessklearndecompositionsparse_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:Anaconda3libsite-packagessklearndecompositiondict_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'
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…