Hi,

I have problems installing matplotlib 0.90.1. An error occurs when doing "python setup.py build":

/usr/include/features.h:150:1: warning: this is the location of the previous definition
src/_ns_backend_agg.cpp: In member function `Py::Object RendererAgg::write_png(const Py::Tuple&)':
src/_ns_backend_agg.cpp:2040: error: `png_structp' undeclared (first use this function)
src/_ns_backend_agg.cpp:2040: error: (Each undeclared identifier is reported only once for each function it appears in.)
src/_ns_backend_agg.cpp:2040: error: expected `;' before "png_ptr"
src/_ns_backend_agg.cpp:2041: error: `png_infop' undeclared (first use this function)
src/_ns_backend_agg.cpp:2041: error: expected `;' before "info_ptr"
src/_ns_backend_agg.cpp:2042: error: aggregate `png_color_8_struct sig_bit' has incomplete type and cannot be defined
src/_ns_backend_agg.cpp:2043: error: `png_uint_32' undeclared (first use this function)
src/_ns_backend_agg.cpp:2043: error: expected `;' before "row"
src/_ns_backend_agg.cpp:2045: error: `png_bytep' undeclared (first use this function)
src/_ns_backend_agg.cpp:2045: error: `row_pointers' undeclared (first use this function)
src/_ns_backend_agg.cpp:2045: error: `png_bytep' has not been declared
src/_ns_backend_agg.cpp:2046: error: `row' undeclared (first use this function)
src/_ns_backend_agg.cpp:2057: error: `png_ptr' undeclared (first use this function)
src/_ns_backend_agg.cpp:2057: error: `PNG_LIBPNG_VER_STRING' undeclared (first use this function)
src/_ns_backend_agg.cpp:2057: error: `png_create_write_struct' undeclared (first use this function)
src/_ns_backend_agg.cpp:2064: error: `info_ptr' undeclared (first use this function)
src/_ns_backend_agg.cpp:2064: error: `png_create_info_struct' undeclared (first use this function)
src/_ns_backend_agg.cpp:2067: error: `png_destroy_write_struct' undeclared (first use this function)
src/_ns_backend_agg.cpp:2079: error: `png_init_io' undeclared (first use this function)
src/_ns_backend_agg.cpp:2082: error: `PNG_COLOR_TYPE_RGB_ALPHA' undeclared (first use this function)
src/_ns_backend_agg.cpp:2082: error: `PNG_INTERLACE_NONE' undeclared (first use this function)
src/_ns_backend_agg.cpp:2083: error: `PNG_COMPRESSION_TYPE_BASE' undeclared (first use this function)
src/_ns_backend_agg.cpp:2083: error: `PNG_FILTER_TYPE_BASE' undeclared (first use this function)
src/_ns_backend_agg.cpp:2083: error: `png_set_IHDR' undeclared (first use this function)
src/_ns_backend_agg.cpp:2092: error: `png_set_sBIT' undeclared (first use this function)
src/_ns_backend_agg.cpp:2094: error: `png_write_info' undeclared (first use this function)
src/_ns_backend_agg.cpp:2095: error: `png_write_image' undeclared (first use this function)
src/_ns_backend_agg.cpp:2096: error: `png_write_end' undeclared (first use this function)
error: command 'gcc' failed with exit status 1


Any ideas what I can do?
Also, how to install matplotlib in an other directory? I tried:
> python setup.py  --prefix=/home/Install install
and
>python setup.py  install --prefix=/home/Install

but both commands did not work, although it is written I shall use the '--prefix' argument to specify a different directory !?!

Any ideas?

Thanks
  Alex