Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can't build matplotlib (png package issue)

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 ?

like image 350
cur4so Avatar asked May 04 '15 05:05

cur4so


3 Answers

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?

like image 127
Jeremy Avatar answered Nov 11 '22 08:11

Jeremy


Under Cent Os 7, I was able to install matplotlib after installing libpng-static. Please try libpng-static as well as libpng-devel.

like image 2
guest Avatar answered Nov 11 '22 07:11

guest


In mint/kubuntu as of today, it's named: libpng16-devtools, so the command to install it would be:

sudo apt-get install libpng16-devtools

like image 2
y3l2n Avatar answered Nov 11 '22 07:11

y3l2n