The ImportError: cannot import name '_api' from 'matplotlib'

Hello, I have been using conda environment to install matplotlib. I used conda install -c conda-forge matplotlib. it was finished successfully. However, i keep getting the following error message after testing with import matplotlib.pyplot as plt. i tried uninstall and re-install again, but the error message is still the same.

>> import matplotlib.pyplot as plt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\u\Anaconda3\envs\kaggle_new\lib\site-packages\matplotlib\pyplot.py", line 40, in <module>
    from matplotlib.figure import Figure, figaspect
  File "C:\Users\u\Anaconda3\envs\kaggle_new\lib\site-packages\matplotlib\figure.py", line 20, in <module>
    from matplotlib import backends, docstring, projections
  File "C:\Users\u\Anaconda3\envs\kaggle_new\lib\site-packages\matplotlib\projections\__init__.py", line 4, in <module>
    from mpl_toolkits.mplot3d import Axes3D
  File "C:\Users\u\AppData\Roaming\Python\Python37\site-packages\mpl_toolkits\mplot3d\__init__.py", line 1, in <module>
    from .axes3d import Axes3D
  File "C:\Users\u\AppData\Roaming\Python\Python37\site-packages\mpl_toolkits\mplot3d\axes3d.py", line 22, in <module>
    from matplotlib import _api, artist, cbook, docstring
ImportError: cannot import name '_api' from 'matplotlib' (C:\Users\u\Anaconda3\envs\kaggle_new\lib\site-packages\matplotlib\__init__.py)

It looks like you have a python install outside of anaconda that is being picked up before the conda one. You can either clear the paths up or just remove it if you don’t need it.