Issues with my installation of Matplotlib

I am on a windows 10 and i am trying to import Matplotlib.pyplot in Anaconda, however i get this error:


ImportError Traceback (most recent call last)
in
1 import pandas as pd
2 import numpy as np
----> 3 import matplotlib.pyplot as plt
4 get_ipython().run_line_magic(‘matplotlib’, ‘inline’)

~\AppData\Roaming\Python\Python37\site-packages\matplotlib_init_.py in
203
204
–> 205 _check_versions()
206
207

~\AppData\Roaming\Python\Python37\site-packages\matplotlib_init_.py in _check_versions()
188 # Quickfix to ensure Microsoft Visual C++ redistributable
189 # DLLs are loaded before importing kiwisolver
–> 190 from . import ft2font
191
192 for modname, minver in [

ImportError: cannot import name ‘ft2font’ from ‘matplotlib’ (C:\Users\kpy\AppData\Roaming\Python\Python37\site-packages\matplotlib_init_.py)

It was working fine until very recently when i tried again.

@kurtispykes In https://github.com/matplotlib/jupyter-matplotlib/issues/155 you said you got this fixed. What was the underlying issue?

As you had cleverly noticed, I had installed python from python.org and Anaconda was using that instead. I believe it may have something to do with me selecting add PATH during installation, I will reinstall python without selecting that option and confirm. Thanks once again!

Interesting, I had a pure install from Anaconda distribution from the beginning and used conda to update jupyter, but yet, it dropped an invalid file that caused this error.

Seems like conda must have a bug. I think I finally have my issue resolved.

Thanks

What did you do to resolve the issue?

@tacaswell sorry for my lack of clarity… I removed the python directory and everything worked fine in my Anaconda environment

And @dwervin, what did you do to sort out your problem?