Jupyter: No module named 'imblearn" after installation

TTZ picture TTZ · Dec 2, 2017 · Viewed 57.5k times · Source

I installed "imbalanced-learn" (version 0.3.1) on ANACONDA Navigator. When I ran an example from the imbalanced-learn website using Jupyter (Python 3), I got an message regarding "ModuleNotFoundError". No module named 'imblearn".

from imblearn.datasets import make_imbalance
from imblearn.under_sampling import NearMiss
from imblearn.pipeline import make_pipeline
from imblearn.metrics import classification_report_imbalanced

How could I resolve this?

Answer

TTZ picture TTZ · Dec 2, 2017

Problems importing imblearn python package on ipython notebook

Found the answer here. This worked for me

conda install -c glemaitre imbalanced-learn