I am trying to do:

import imblearn

in my jupyter notebook, but when I run the cell I get the following error message:

SyntaxError: invalid syntax

even if I have installed the package. I am using python 2.

What could the problem be, and how do I solve it?

  • $\begingroup$ what is imblearn for $\endgroup$ – develarist Nov 8 '20 at 11:03
  • $\begingroup$ @develarist, I want to use it for dealing with an imbalanced dataset $\endgroup$ – J.D. Nov 9 '20 at 18:41
  • $\begingroup$ try imbalanced-learn pypi.org/project/imbalanced-learn $\endgroup$ – Peter Nov 9 '20 at 22:54

If you check the pypi source package you can see that they are most likely depracated and they advise you to use imbalanced-learn instead.


Not the answer you're looking for? Browse other questions tagged or ask your own question.