Unable to install matplotlib using pip in Ubuntu 16.04

8,582

As described in this post on StackOverflow this is a "known bug". On Github, they explain that when freetype-config is missing the setup.py crashes. The output of the error message looks a bit different in this one but it seems like it can be handled just as explained in the link that I posted. By typing:

sudo apt-get install libfreetype6-dev libxft-dev

followed by:

sudo pip install matplotlib
Share:
8,582

Related videos on Youtube

Divyat
Author by

Divyat

Updated on September 18, 2022

Comments

  • Divyat
    Divyat over 1 year

    In Ubuntu 16.04 I am able to install almost every python package and library using pip except for matplotlib.

    I use this command to install matplotlib pip install matplotlib This gives the error: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-z5w80J/matplotlib/

    But I don't obsereve this error while installing any other python package and I have no clue of why this error comes. Please help as I need to use matplotlib library.

    • Pascal
      Pascal almost 8 years
      It is not completely the same error code but have you tried this: <stackoverflow.com/questions/25674612/…>
    • Timo
      Timo almost 8 years
      In the future, provide the full error message. That last line is useless and the error was reported earlier in the output. It would've given you the exact details of what went wrong.
    • edwinksl
      edwinksl almost 8 years
      @Pascal Can you write an answer since the OP has said the solution in the link you posted worked?