Jupyter Notebook: Importing SMOTE from imblearn - ImportError: cannot import name 'pairwise_distances_chunked'

Billy Hansen picture Billy Hansen · Oct 18, 2018 · Viewed 11.8k times · Source

I'm trying to use the SMOTE package in the imblearn library using:

from imblearn.over_sampling import SMOTE

getting the following error message:

ImportError: cannot import name 'pairwise_distances_chunked'.

Here is a screenshot of my import screenshot of download confirmation

Really stumped on this, any guidance would be greatly appreciated.

Answer

00__00__00 picture 00__00__00 · Nov 15, 2018

I have encountered a similar problem. I could solve by opening a new IPython console.