problems installing matplotlib

I have been trying to install matplotlib under various versions of python.
I was able to get it installed in a 2.4.2 version, but, attempts to install
it in 2.5.3 and 2.6.1 have run into the same problem, that being the inability
of the setup script to locate numpy and freetpye2, both of which are present on
the system, and in the case of numpy, installed under the version I am
attempting to install matplotlib into.

Our system is running SLES 10, and there is a version of python installed in
the standard place. However, I am trying to build this into a different version
in a different location. This worked just fine with Python 2.4.2. However,
when I try 2.5.3 for example I am getting the following:
70> python build


                python: 2.5.3 (r253:67855, Mar 13 2009, 14:22:40) [GCC
                        4.1.2 20070115 (prerelease) (SUSE Linux)]
              platform: linux2

                 numpy: 1.2.1
             freetype2: 9.8.3

                libpng: 1.2.8
X11 connection rejected because of wrong authentication.
X connection to cfe3:42.0 broken (explicit kill or server shutdown).
cfe3.hsp 73> rpm -qa | grep freetype2
s /nasa/pd/python/2.5.3/gcc/lib/python2.5/site-packages/numpy
COMPATIBILITY __config__.pyc core f2py numarray
DEV_README.txt fft oldnumeric
INSTALL.txt __init__.pyc ctypeslib.pyc lib random
LICENSE.txt distutils linalg
README.txt _import_tools.pyc doc ma setup.pyc
THANKS.txt add_newdocs.pyc dual.pyc matlib.pyc setupscons.pyc

Running the test in python to see the version of numpy works just fine. So,
the question is why doesn't the script find numpy and freetype2. Or,
perhaps the question is what do I need to do to get it to find them? The
version for numpy is the same as referenced in the "REQUIRED DEPENDENCIES."

Perhaps there is a step that I need to do before running python build
that I am unaware of. I am not all that familiar with python in general.

If this is not the best place for this kind of question, please let me know.

Additional info:

uname -a
Linux cfe3 #1 SMP Mon Jan 21 13:29:51 UTC 2008
ia64 ia64 ia64 GNU/Linux

While this system is an IA64, I have run into the same problem on an X86_64
system as well.