Can't compile matplotlib on Ubuntu 11.04 / ft2build.h: No such file or directory
13,514
Solution 1
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?
Solution 2
I should install libfreetype-dev
(Ubuntu).
Solution 3
For RHEL use below command :
yum install freetype-devel -y
For Ubuntu use below command:
apt-get install libfreetype-dev -y
Related videos on Youtube
Author by
ruh roh
Updated on September 18, 2022Comments
-
ruh roh over 1 year
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
andlibfreetype6-dev
with apt-get. I can't answer it now so I'll edit it later or something. -
ruh roh almost 13 yearsI 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.
-
Somu about 11 yearsOP 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.
-
ako about 5 yearsI had the same problem when compiling
php-7.1.12
on CentOS-7, I did/usr/include/freetype2
and every thing went OK.