[SciPy-user] matplotlib and python 2.5 on Intel OS X

John Hunter jdhunter at ace.bsd.uchicago.edu
Mon Oct 9 10:01:56 EDT 2006


>>>>> "Gennan" == Gennan Chen <gnchen at cortechs.net> writes:

    Gennan> Hi!  I am like to compile matplotlib for ython 2.5 on
    Gennan> Intel OSX.  Compilation went fine. But I got segmented
    Gennan> faults when I tried to run some test scripts. Anyone ever
    Gennan> successfully built it on python 2.5??  If did, can you
    Gennan> give me some hints on setup.py?

matplotlib questions should be directed to matplotlib-users or
matplotlib-devel.  In the mean time, please take a look at the
attached instructions for debugging segfaults.  Once you've
collected some of this, please post to the devel list.

# How to diagnose where a segfault is occurring

First thing to try is simply rm -rf the site-packages/matplotlib and
build subdirs and get a clean install.  Installing a new version over
a pretty old version has been known to cause trouble, segfault, etc.

Try importing these packages individually

  import matplotlib._image
  import matplotlib._transforms

  #one of these three depending on which numerix package you are using
  import matplotlib.backends._na_backend_agg # for numarray
  import matplotlib.backends._nc_backend_agg # for Numeric
  import matplotlib.backends._ns_backend_agg # for numpy

  import matplotlib.backends._tkagg
  import matplotlib._agg


If the last two work and the others don't, it is likely you need to
upgrade your gcc, because on some platforms (OS X for sure) old
versions of gcc cannot compile new versions of pycxx, which matplotlib
uses for building some but not all of it's extensions.  Report back
which if any work or segfault or raise tracebacks,

If that shed additional light, again flush the build and install dirs,
and try setting VERBOSE=True in setup.py before doing a clean install.
The VERBOSE setting will generate lots of extra output and may help
indicate where the segfault is occurring 



More information about the SciPy-User mailing list