Hi folks,
Firstly, congratulations on matplotlib - a great tool.
I thought I would share with you the problems I have had (and overcome) with installing matplotlib
on my computer (which runs Linux with many packages taken from source).
The short version, is that I could not simply run
python setup.py build
but instead had to run:
sed -e "s@...55...*linux2.*@ 'linux2' : ['/usr/local', '/usr',],@" setupext.py >newsetupext.py
mv newsetupext.py setupext.py
sudo mv /usr/local/include/pygtk /usr/local/include/pygtk-1.2
CC=g++ python setup.py build
sudo mv /usr/local/include/pygtk-1.2 /usr/local/include/pygtk
I have things like fontconfig installed in /usr/local, so had to add /usr/local to the path
(explaining the sed).
I also have both pygtk1.2 (0.6.11) and pygtk2.2 (2.2.0), including the header files. Since pygtk1.2
installs its header files in /usr/local/include/pygtk, and pygtk2.2 in /usr/local/include/pygtk-2.0,
adding /usr/local/include/pygtk-2.0 to the include path and then including pygtk seems to pick up
the pygtk1.2 header files rather than the pygtk subdirectory of /usr/local/include/pygtk-2.0
(explaining the mv's).
Lastly, I needed to explicitly inform python distutils that it is compiling c++ (explaining the
CC=g++ environment variable).
So that this list is searchable, the kind of problems solved by the above were:
/usr/local/include/ft2build.h:56: freetype/config/ftheader.h: No such file or directory
src/ft2font.c: In function `newFT2FontObject':
src/ft2font.c:171: parse error before `*'
and an inability to use the GTKAgg backend because it was compiled against the wrong headers
(complaining at runtime that it could not import _gtk).
Anyway, I hope this is helpful to someone, and sorry if it has been discussed before etc (I only
have a slow dial-up link and browsing sourceforge mailing lists is painful.)
Tim Corbett-Clark.