I’ve tried to install matplotlib
using pip
on Linux and it couldn’t find freetype
during the build process, even though it’s installed with dev packages.
freetype: no [The C/C++ header for freetype2 (ft2build.h)
could not be found. You may need to install the
development package.]
But:
$ ls -l /usr/include/freetype2/ft2build.h
-rw-r--r-- 1 root root 2383 Mar 13 17:29 /usr/include/freetype2/ft2build.h
And:
$ freetype-config --cflags
-I/usr/include/freetype2
A temporary fix would be to create a symlink before installing matplotlib using pip.
Never mind; upon further investigation, this is unrelated to #2623.
This bug only occurs if pkg-config is not installed; a simple
will shore up the include paths for now.
Same here.
did the trick
Same here with OS X 10.10.3
fixed with
@calebebrim Did you actually install freetype?
Freetype is a dependency of matplotlib and needs to be installed for matplotlib to build. pkg-config only helps locate it.
Same problem here,
sudo apt-get install pkg-config
resolved it. It would be very helpful if the build script would either suggest checkingpkg-config
directly, or would point to this GitHub issue. It would certainly have saved me at least 15 minutes of trial and error before landing here.If you are using docker, and install matplotlib in
python:3.5-alpine
, add this in yourDockerfile
may hlep: