imblearn error installing smote I wanna install smote from imblearn package and I got the Following error:

ImportError                               Traceback (most recent call last)
&lt;ipython-input-10-77606507c62c&gt; in &lt;module&gt;()
     66 len(data[data["num"]==0])
     67 #balancing dataset
---&gt; 68 from imblearn.over_sampling import SMOTE
     69 import matplotlib.pyplot as plt
     70 sm = SMOTE(random_state=42)

~\Anaconda3\lib\site-packages\imblearn\__init__.py in &lt;module&gt;()
     33 """
     34 
---&gt; 35 from .base import FunctionSampler
     36 from ._version import __version__
     37 

~\Anaconda3\lib\site-packages\imblearn\base.py in &lt;module&gt;()
     17 from sklearn.utils import check_X_y
     18 
---&gt; 19 from .utils import check_sampling_strategy, check_target_type
     20 from .utils.deprecation import deprecate_parameter
     21 

~\Anaconda3\lib\site-packages\imblearn\utils\__init__.py in &lt;module&gt;()
      5 from ._docstring import Substitution
      6 
----&gt; 7 from ._validation import check_neighbors_object
      8 from ._validation import check_target_type
      9 from ._validation import check_ratio

~\Anaconda3\lib\site-packages\imblearn\utils\_validation.py in &lt;module&gt;()
     12 
     13 from sklearn.base import clone
---&gt; 14 from sklearn.neighbors.base import KNeighborsMixin
     15 from sklearn.neighbors import NearestNeighbors
     16 from sklearn.externals import six

~\Anaconda3\lib\site-packages\sklearn\neighbors\__init__.py in &lt;module&gt;()
      7 from .kd_tree import KDTree
      8 from .dist_metrics import DistanceMetric
----&gt; 9 from .graph import kneighbors_graph, radius_neighbors_graph
     10 from .unsupervised import NearestNeighbors
     11 from .classification import KNeighborsClassifier, RadiusNeighborsClassifier

~\Anaconda3\lib\site-packages\sklearn\neighbors\graph.py in &lt;module&gt;()
      5 # License: BSD 3 clause (C) INRIA, University of Amsterdam
      6 
----&gt; 7 from .base import KNeighborsMixin, RadiusNeighborsMixin
      8 from .unsupervised import NearestNeighbors
      9 

~\Anaconda3\lib\site-packages\sklearn\neighbors\base.py in &lt;module&gt;()
     20 from .kd_tree import KDTree
     21 from ..base import BaseEstimator
---&gt; 22 from ..metrics import pairwise_distances_chunked
     23 from ..metrics.pairwise import PAIRWISE_DISTANCE_FUNCTIONS
     24 from ..utils import check_X_y, check_array, gen_even_slices

ImportError: cannot import name 'pairwise_distances_chunked' from 'sklearn.metrics' (C:\Users\ASUS\Anaconda3\lib\site-packages\sklearn\metrics\__init__.py)
Try closing and restarting ipython. imblearn requires scikit-learn >= 0.20 and sometimes the runtime loads in an older version of scikit-learn.

If the issue still persists, then reinstall all packages together to make sure they are compatible.