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.
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.
@kennetheno Can you please copy-paste the full error? Trying to debug from screenshots is extremely difficult (they can’t be searched and important information is cut off.