'Having issues to import imblearn python package on Jupyter notebook on Anaconda

I wanted to install imbalanced-learn using pip install imbalanced-learn. Then I have tried import

from imblearn.ensemble import EasyEnsembleClassifier

This import gave me the following error. I did try with uninstall imbalanced-learn and re-install imbalanced-learn, but it didn't help.

ImportError: cannot import name '_joblib_parallel_args' from 'sklearn.utils.fixes' (C:\Users\Jishan\anaconda3\envs\summerprojects\lib\site-packages\sklearn\utils\fixes.py)

I also tried

pip: pip install -U imbalanced-learn
anaconda: conda install -c glemaitre imbalanced-learn

They were not helpful as well. I was using Anaconda virtual environment. I appreciate your suggestions. Thanks!



Solution 1:[1]

you can try this :

  • conda install -c conda-forge imbalanced-learn to update documentation
  • sudo pip3 install imblearn to install imblearn

Solution 2:[2]

on command prompt : pip3 install imblearn on anaconda !pip3 install imblearn

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 BAYU CANDRA SENO AJI
Solution 2 Anubhav