Ubuntu: why wont python-pip install matplotlib work?



Question:

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.


Solution:1

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  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »