Importerror: No Module Named Sklearn (Python)

ModuleNotFoundError: No module named 'sklearn.decomposition'

Please check your scikit-learn package version:

import sklearn
print (sklearn.__version__) # this causes the problem!

You can uninstall your current scikit-learn:

$ conda remove scikit-learn

then install the downgraded package instead:

$ conda install -c conda-forge scikit-learn=0.20

ModuleNotFoundError: No module named 'sklearn.metrics.regression'

You're probably looking to import them from sklearn.metrics, not sklearn.metrics.regression

Link to the library

ImportError: No module named sklearn.cross_validation

It must relate to the renaming and deprecation of cross_validation sub-module to model_selection. Try substituting cross_validation to model_selection



Related Topics



Leave a reply



Submit