Hi, I have been having problems trying to install matplotlib properly on our server. Our environment is Debian 4.1.1-21, Python2.4 , and I have installed all the required modules (numpy, Numeric etc). I originally tried installing matplotlib from source, but the build was unsuccessful. I was getting this error when I tried building matplotlib-0.90.1:
python setup.py build building for GTK requires pygtk; you must be able to "import gtk" in your build/install environment TKAgg requires TkInter running build running build_py copying lib/matplotlib/mpl-data/matplotlibrc -> build/lib.linux-x86_64-2.3/matplotlib/mpl-data running build_ext building 'matplotlib.backends._na_backend_agg' extension c++ -pthread -shared build/temp.linux-x86_64-2.3/agg23/src/agg_trans_affine.o build/temp.linux-x86_64-2.3/agg23/src/agg_path_storage.o build/temp.linux-x86_64-2.3/agg23/src/agg_bezier_arc.o build/temp.linux-x86_64-2.3/agg23/src/agg_curves.o build/temp.linux-x86_64-2.3/agg23/src/agg_vcgen_dash.o build/temp.linux-x86_64-2.3/agg23/src/agg_vcgen_stroke.o build/temp.linux-x86_64-2.3/agg23/src/agg_rasterizer_scanline_aa.o build/temp.linux-x86_64-2.3/agg23/src/agg_image_filters.o build/temp.linux-x86_64-2.3/src/_image.o build/temp.linux-x86_64-2.3/src/ft2font.o build/temp.linux-x86_64-2.3/src/mplutils.o build/temp.linux-x86_64-2.3/CXX/IndirectPythonInterface.o build/temp.linux-x86_64-2.3/CXX/cxx_extensions.o build/temp.linux-x86_64-2.3/CXX/cxxsupport.o build/temp.linux-x86_64-2.3/CXX/cxxextensions.o build/temp.linux-x86_64-2.3/src/_na_backend_agg.o -L/usr/local/lib -L/usr/lib -L/usr/lib64 -L/usr/local/lib -L/usr/lib -L/usr/lib64 -lpng -lz -lstdc++ -lm -lfreetype -lz -lstdc++ -lm -o build/lib.linux-x86_64-2.3/matplotlib/backends/_na_backend_agg.so /usr/bin/ld: /usr/local/lib/libpng.a(png.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libpng.a: could not read symbols: Bad value collect2: ld returned 1 exit status error: command 'c++' failed with exit status 1 So I tried installing matplotlib from distribution (ie. using apt-get install python-matplotlib), thinking it may work instead of me trying to manually install it. The distribution installs matplotlib-0.87.7, which is older than the current version available by source. And it seemed to compile fine without any errors. However, when I try to import pylab using python command line, I get this error: import matplotlib import pylab Traceback (most recent call last): File "<stdin>", line 1, in ? File "pylab.py", line 1, in ? from matplotlib.pylab import * File "matplotlib/pylab.py", line 197, in ? import cm File "matplotlib/cm.py", line 5, in ? import colors File "matplotlib/colors.py", line 33, in ? from numerix import array, arange, take, put, Float, Int, where, \ File "matplotlib/numerix/__init__.py", line 75, in ? from _sp_imports import nx, infinity, rand, randn, isnan, all, any File "matplotlib/numerix/_sp_imports.py", line 9, in ? from numpy import Int8, UInt8, \ ImportError: cannot import name Int8 I think this Debian distribution of matplotlib (which is older than the current release) is incompatible with the current version of numpy/Numeric that I have installed, but I'm not sure. I would rather have the latest matplotlib vesrion installed (version 0.90.1), but I can't seem to get it to even build properly. I'm stumped and I'm hoping someone has an idea why I might be getting this error, and how I can get around it. Please let me know if you need more information if it helps understand the problem better. Thanks in advance, best, Hardeep ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel