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)
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\ in
–> 205 _check_versions()

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

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

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

@kurtispykes In you said you got this fixed. What was the underlying issue?

As you had cleverly noticed, I had installed python from 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.


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?

my version of python is python 3.8.2
as for my version of gcc i don’t know what that means

I am trying to install Matplotlib from my Pycharm as shown below using the + sign here

i got this error

pls help out i have a deadline to meet thanks

@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.

1 Like

ok @tacaswell

the restrain am having is that the length of the error code is more than the maximum body character of 32000 characters

while the error code is 62923 characters
please what other means should i use to send the error code

I suggest a link to a gist on github or filtering on the error message a bit before you post it.

@kennetheno @tacaswell has any progress been made on the FreeType error? I am also running into it

@Dylan_Dilla Can you provide the traceback you are getting?

Can you please also tell us:

  • Operating system and version
  • Python version
  • How you install Python
  • How you install Matplotlib
sudo apt-get install libfreetype6-dev
sudo apt-get install pkg-config
sudo apt-get install libpng12-dev
sudo apt-get install pkg-config