install problem with python 2.5

I am trying to install matplotlib 0.87.7 with my newly separate

    >> installed python 2.5. For this I installed 'pygtk 2.4.1' and
    >> numpy 1.0 using this python 2.5 installation. Now, running
    >> 'python2.5 build' I get this error:
    >> ... /usr/include/pygtk-2.0/pygobject.h:140: error: expected
    >> `,' or `...' before "typename"

    >> it seems, that matplotlib tries to use the old installed pygtk
    >> version; the new one is located in /usr/local/include/...

Yes, this is the old pygtk bug covered in this FAQ

maptlotlib gets its gtk configuration from the pkg-config commands, eg

  > pkg-config --cflags-only-I gtk+-2.0

make sure your pkg-config is picking up the new pygtk you have
installed, and if not set the PKG_CONFIG_PATH environment variable.
See 'man pkg-config' for more details.

    > from matplotlib.pylab import * File
    > "/opt/python-2.5//lib/python2.5/site-packages/matplotlib/",
    > line 199, in <module> import mlab #so I can override hist,
    > psd, etc... File
    > "/opt/python-2.5//lib/python2.5/site-packages/matplotlib/",
    > line 6 4, in <module> import nxutils File
    > "/opt/python-2.5//lib/python2.5/site-packages/matplotlib/",
    > lin e 17, in <module> from matplotlib._ns_nxutils import *
    > ImportError: No module named _ns_nxutils
    >>>> import numpy

It appears you did not have numpy installed when you built
matplotlib. Grab numpy-1.0 from and install it
(it's an easy install compared to mpl). Then rebuild and reinstall
matplotlib and you should be good to go.