segfaults in ipython

I still can plot as root, but not as user!? If it's some

That I find bizarre. Could it be a PATH or an LD_LIBRARY_PATH issue;
ie, you and root are using different libraries. Have you customized
either of these variables? For example, if you do the following as
yourself and root, do you get the same link information

  > ldd /usr/lib/python2.4/site-packages/matplotlib/_nc_transforms.so
  > ldd /usr/lib/python2.4/site-packages/Numeric/_numpy.so

    > kind of permission problem it would be good to know
    > something about "../Objects/moduleobject.c". I there a way
    > to get IPython to print the full path?

This is part of python -- if you install python-dev you should be able
to find the header on your system, eg at

  /usr/include/python2.4/moduleobject.h

    > Uh, I didn't build TkAgg, So I set BUILD_TKAGG = 'auto',
    > but

    > Do I have to install something besides python-tk?

You need the tk8.4-dev and maybe the tcl8.4-dev headers. You may have
a different version number.

    > I hope we can sort this out.

Two other things to try.

  1) See if we can narrow down where the segfault is occurring by trying
     to import the matplotlib modules separately

      import matplotlib.ft2font
      import matplotlib._transforms
      import matplotlib._agg
      import matplotlib.backends._backend_agg
      import matplotlib.backends._gtkagg

  2) Compile matplotlib with

      VERBOSE = True

     in setup.py. This will cause the extension code to generate lots
     of messages, and we may be able to narrow down precisely where
     the crash is occurring.

JDH

John Hunter wrote:

"Steve" == Steve Schmerler <elcorto@...361...> writes:

    > I still can plot as root, but not as user!? If it's some

That I find bizarre. Could it be a PATH or an LD_LIBRARY_PATH issue;
ie, you and root are using different libraries. Have you customized
either of these variables? For example, if you do the following as
yourself and root, do you get the same link information

  > ldd /usr/lib/python2.4/site-packages/matplotlib/_nc_transforms.so

I'm using Python 2.3.5, but

no, both:

          libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4009e000)
          libm.so.6 => /lib/tls/libm.so.6 (0x40159000)
          libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4017b000)
          libpthread.so.0 => /lib/tls/libpthread.so.0 (0x40184000)
          libc.so.6 => /lib/tls/libc.so.6 (0x40193000)
          /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

  > ldd /usr/lib/python2.4/site-packages/Numeric/_numpy.so

no, both:

          libpthread.so.0 => /lib/tls/libpthread.so.0 (0x40026000)
          libc.so.6 => /lib/tls/libc.so.6 (0x40036000)
          /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

    > kind of permission problem it would be good to know
    > something about "../Objects/moduleobject.c". I there a way
    > to get IPython to print the full path?

This is part of python -- if you install python-dev you should be able
to find the header on your system, eg at

  /usr/include/python2.4/moduleobject.h

Yes, I have this one (/usr/include/python2.3/moduleobject.h).

    > Uh, I didn't build TkAgg, So I set BUILD_TKAGG = 'auto',
    > but

    > Do I have to install something besides python-tk?

You need the tk8.4-dev and maybe the tcl8.4-dev headers. You may have
a different version number.

Ah OK. That does it.

    > I hope we can sort this out.

Two other things to try.

  1) See if we can narrow down where the segfault is occurring by trying
     to import the matplotlib modules separately

      import matplotlib.ft2font
      import matplotlib._transforms
      import matplotlib._agg
      import matplotlib.backends._backend_agg
      
I hope this was what you ment:

ipython -pylab and then

mpl_ipython.tar.bz2 (5.34 KB)

···

####################################################################

In [1]: import matplotlib.ft2font

In [2]: import matplotlib._transforms

In [3]: import matplotlib._agg

In [4]: import matplotlib.backends._backend_agg
---------------------------------------------------------------------------
exceptions.ImportError Traceback (most
recent call last)

/home/elcorto/Install/Matplotlib/matplotlib-0.83.2/<console>

ImportError: No module named _backend_agg

In [5]: import matplotlib.backends._gtkagg

####################################################################

  2) Compile matplotlib with

      VERBOSE = True

OK this prints a lot. I did

  python setup.py build > build_log.txt

It then prints some additional output which I pasted into
build_log2.txt. I hope this helps in any way.

I attached my setup.py and the *.txt files.

BTW, I installed the .debs (mpl 0.82)

  from http://anakonda.altervista.org (on the mpl website)

and this works!

cheers,
steve

John Hunter wrote:

"Steve" == Steve Schmerler <elcorto@...361...> writes:

    > I still can plot as root, but not as user!? If it's some

That I find bizarre. Could it be a PATH or an LD_LIBRARY_PATH issue;
ie, you and root are using different libraries. Have you customized
either of these variables? For example, if you do the following as
yourself and root, do you get the same link information

  > ldd /usr/lib/python2.4/site-packages/matplotlib/_nc_transforms.so

I'm using Python 2.3.5, but

no, both:

           libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4009e000)
           libm.so.6 => /lib/tls/libm.so.6 (0x40159000)
           libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4017b000)
           libpthread.so.0 => /lib/tls/libpthread.so.0 (0x40184000)
           libc.so.6 => /lib/tls/libc.so.6 (0x40193000)
           /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

  > ldd /usr/lib/python2.4/site-packages/Numeric/_numpy.so

no, both:

           libpthread.so.0 => /lib/tls/libpthread.so.0 (0x40026000)
           libc.so.6 => /lib/tls/libc.so.6 (0x40036000)
           /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

    > kind of permission problem it would be good to know
    > something about "../Objects/moduleobject.c". I there a way
    > to get IPython to print the full path?

This is part of python -- if you install python-dev you should be able
to find the header on your system, eg at

  /usr/include/python2.4/moduleobject.h

Yes, I have this one (/usr/include/python2.3/moduleobject.h).

    > Uh, I didn't build TkAgg, So I set BUILD_TKAGG = 'auto',
    > but

    > Do I have to install something besides python-tk?

You need the tk8.4-dev and maybe the tcl8.4-dev headers. You may have
a different version number.

Ah OK. That does it.

    > I hope we can sort this out.

Two other things to try.

  1) See if we can narrow down where the segfault is occurring by trying
     to import the matplotlib modules separately

      import matplotlib.ft2font
      import matplotlib._transforms
      import matplotlib._agg
      import matplotlib.backends._backend_agg
      
I hope this was what you ment:

ipython -pylab and then

mpl_ipython.tar.bz2 (5.34 KB)

···

####################################################################

In [1]: import matplotlib.ft2font

In [2]: import matplotlib._transforms

In [3]: import matplotlib._agg

In [4]: import matplotlib.backends._backend_agg
---------------------------------------------------------------------------
exceptions.ImportError Traceback (most
recent call last)

/home/elcorto/Install/Matplotlib/matplotlib-0.83.2/<console>

ImportError: No module named _backend_agg

In [5]: import matplotlib.backends._gtkagg

####################################################################

  2) Compile matplotlib with

      VERBOSE = True

OK this prints a lot. I did

  python setup.py build > build_log.txt

It then prints some additional output which I pasted into
build_log2.txt. I hope this helps in any way.

I attached my setup.py and the *.txt files.

BTW, I installed the .debs (mpl 0.82)

  from http://anakonda.altervista.org (on the mpl website)

and this works!

cheers,
steve