can't build matplotlib (png package issue)

cur4so picture cur4so · May 4, 2015 · Viewed 11.4k times · Source

try to build matplotlib on fedora-18, build fails with

...
 png: no  [pkg-config information for 'libpng' could not
                        be found.]
...
                        * The following required packages can not be built:
                        * png

What should I do/check to build png package ?

Answer

Jeremy picture Jeremy · May 4, 2015

Sounds like you don't have libpng-devel installed. This install is not handled by pip, so you'll need to install it yourself.

You should be able to install it via yum.

sudo yum install libpng-devel

You may also need freetype. Maybe try yum-builddep matplotlib?