ft2build.h is located here:
C:\\Program Files\\GnuWin32\\include
Initially, I made the same mistake as here:
Fatal
Another solution for Mac OS X is to install Freetype with Homebrew.
brew install freetype
This error comes about when building matplotlib on Ubuntu 10.10 also. The solution is to do:
sudo apt-get install python-dev libfreetype6-dev
I had the same issue with the jetson nano (aarch64-linux-gnu). this worked for me -
sudo apt-get install python-dev libfreetype6-dev
pip3 install --upgrade cyton
pip3 install matplotlib
I also fixed this problem by installing freetype using homebrew on Mac OS X. However, that was not sufficient, as the libraries were not linked properly under Mac OS X 10.7. So I had to manually add them to pip
command as follows:
brew install freetype
brew install libpng
LDFLAGS="-L/usr/local/opt/freetype/lib -L/usr/local/opt/libpng/lib" CPPFLAGS="-I/usr/local/opt/freetype/include -I/usr/local/opt/libpng/include -I/usr/local/opt/freetype/include/freetype2" pip install matplotlib
Note that you also have to add the folder /usr/local/opt/freetype/include/freetype2
, which is not included by default on the homebrew notification, but will result in not finding ft2build.h
.
For those who might have the same issue but on a Mac OS 10.6 (snow leopard) and Python 2.7. , the easiest solution I found was to get a make file which downloads Numpy, scipy and matplotlib and compile them for you. You can customize the make file to get you matplotlib only. Here is the link to the solution.
Download your file to a folder on your C drive.
In windows CMD prompt as Administrator navigate you your path using
cd..
or cd wheels
(in my case I saved the file to c:\Wheels
)
then type pip install YourFilename.whl
Results in
Processing c:\wheels\scipy-0.19.0-cp27-cp27m-win_amd64.whl
Requirement already satisfied: numpy>=1.8.2 in c:\python27\lib\site-packages (from scipy==0.19.0)
Installing collected packages: scipy
Successfully installed scipy-0.19.0