3

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.

Divyat
  • 31
  • 1
  • 4
  • It is not completely the same error code but have you tried this: – Pascal Jun 26 '16 at 18:17
  • 1
    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. – Timo Jun 27 '16 at 07:50
  • @Pascal Can you write an answer since the OP has said the solution in the link you posted worked? – edwinksl Jun 27 '16 at 10:22

1 Answers1

2

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
Pascal
  • 31
  • 3