why wont python-pip install matplotlib work?

I just installed kubuntu 16.04 on my computer and started to install some python packages but some of them wont install. the command I type in is

pip install matplotlib 

and it does not work. I get the following error message

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-H6XoGm/matplotlib/

I am running python 2.7.12 and I have updated python-pip.

3

1 Answer

Based on the comments, you are missing some of the dependencies that matplotlib requires, namely libpng-dev and libfreetype6-dev. Install these dependencies by running:

sudo apt update
sudo apt install libpng-dev libfreetype6-dev

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like