Aditya Varma Indukuri
Aditya Varma Indukuri

Reputation: 71

Unable to import SMOTE due to error <<ImportError: cannot import name 'lobpcg' from 'sklearn.utils.fixes' >>

Unable to import SMOTE due to error ImportError: cannot import name 'lobpcg' from 'sklearn.utils.fixes' (E:\Installations\lib\site-packages\sklearn\utils\fixes.py)

Above error is displayed when I am trying to import below packages

from imblearn.combine          import SMOTETomek

from imblearn                  import under_sampling, over_sampling

from imblearn.over_sampling    import SMOTE

I have conda installed sklearn, imbllearn. Can some one help me to resolve this error

Upvotes: 1

Views: 3799

Answers (1)

glemaitre
glemaitre

Reputation: 1003

This is error is raised within scikit-learn.

Be sure to install both library using:

conda install scikit-learn -c conda-forge 
conda install imbalanced-learn -c conda-forge

Be aware that I am using the conda-forge channel to install scikit-learn to get the version 0.22 because the latest version is not available on the conda default channel for the moment.

Upvotes: 2

Related Questions