Hi all,
I just tried installing matplotlib for the first time, and I ran into some problems. At first, matplotlib
didn’t compile because it didn’t find the locally installed Numeric header files, even though those were in
the python path. I then looked through some documentation, and found I had to edit basedir in
setupext.py, to refer to the local include dirs. Problem here was that these header files are under
$HOME/local/include/python2.3/, and the libs under $HOME/local/lib/python2.3/site-packages/, while
setupext.py seems to expect to find them under basedir/include and basedir/lib, so that didn’t fix it.
I then simply copy the header files to matplotlib/src/ so the compiler would find them anyway, and
indeed, matplotlib compiled nicely. Alas, it still doesn’t work, when I try to import pylab in a python shell,
I get the following error message:
The import of the numeric version of the _image module,
_nc_image, failed. This is is either because numeric was
unavailable when matplotlib was compiled, because a dependency of
_nc_image could not be satisfied, or because the build flag for
this module was turned off in setup.py. If it appears that
_nc_image was not built, make sure you have a working copy of
numeric and then re-install matplotlib. Otherwise, the following
traceback gives more details:
Traceback (most recent call last):
File “”, line 1, in ?
File “/homes/morlet/aborghgr/local/lib/python2.3/site-packages/pylab.py”, line 1, in ?
from matplotlib.pylab import *
File “/homes/morlet/aborghgr/local/lib/python2.3/site-packages/matplotlib/pylab.py”, line 198, in ?
from axes import Axes, PolarAxes
File “/homes/morlet/aborghgr/local/lib/python2.3/site-packages/matplotlib/axes.py”, line 24, in ?
import _image
File “/homes/morlet/aborghgr/local/lib/python2.3/site-packages/matplotlib/_image.py”, line 11, in ?
from matplotlib._nc_image import *
ImportError: /homes/morlet/aborghgr/local/lib/python2.3/site-packages/matplotlib/_nc_image.so: undefined symbol: png_set_sBIT
So Numeric still wasn’t found. I suspect this means setup.py didn’t find the libs when building, but
why didn’t it throw an error? And why wasn’t Numeric found? It’s installed locally, but it’s in the path,
I can import Numeric perfectly in a shell. Anyone care to help?
···
–
Alex Borghgraef