source : http://*.com/questions/9829175/pip-install-matplotlib-error-with-virtualenv
Building Matplotlib requires libpng
(and freetype
, as well) which isn't a python library, so pip
doesn't handle installing it (or freetype
).
You'll need to install something along the lines of libpng-devel
and freetype-devel
(or whatever the equivalent is for your OS).
See the building requirements/instructions for matplotlib.
To generate graph in png format you need to Install following dependent packages
sudo apt-get install libpng-dev
sudo apt-get install libfreetype6-dev