4

I'm trying to build matplotlib from source but it isn't working. It seems this thing was a part of X11, and since Ubuntu is now using Wayland that screwed things up, I think.

Anyway to fix this?

Oh, ok. I just had to install libfreetype6 and libfreetype6-dev with apt-get. I can't answer it now so I'll edit it later or something.

3 Answers 3

4

I found these dependencies in the install file:

  matplotlib core: zlib, zlib-devel, libpng, libpng-devel,
                   freetype, freetype-devel, freetype-utils

  gtk backend: gtk2-devel, gtk+-devel, pygtk2, glib-devel,
               pygtk2-devel, gnome-libs-devel, pygtk2-libglade

  tk backend: tcl, tk, tkinter

Do you have all those installed?

1
  • I have now! Truth be told I realized now that they tell you in the matplotlib page that you need libpng and freetype but I guess I just skipped that part. Thanks anyway though.
    – ruh roh
    Apr 30, 2011 at 5:32
3

I should install libfreetype-dev (Ubuntu).

2
  • 1
    OP has already clarified in an edit that the issue is solved: Oh, ok. I just had to install libfreetype6 and libfreetype6-dev with apt-get.
    – user25656
    Mar 26, 2013 at 11:24
  • I had the same problem when compiling php-7.1.12 on CentOS-7, I did /usr/include/freetype2 and every thing went OK.
    – ako
    Apr 12, 2019 at 20:21
1

For RHEL use below command :

yum install freetype-devel -y

For Ubuntu use below command:

apt-get install libfreetype-dev -y
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .