fedora core 3 install problem

After that the build and install went smoothly. But now

    > if I try to import pylab I get the following error:
    > pixbuf_get_pixels_array ImportError: No module named
    > _nc_backend_gdk

    > As far as I can see it is still trying to use some
    > gtk-stuff?

This is a bit of annoyance in the mpl setup. The backend that is
chosen at runtime is determined by the rc file (see
http://matplotlib.sf.net/.matplotlibrc) and the default backend in the
rc file is GTKAgg. Even if you turn GTK compilation off in setup.py,
the rc file still determines which backend is selected. You need to
copy that file from its default location (eg
/usr/share/matplotlib/.matplotlibrc) to your HOME directory and edit
the 'backend' setting to something else, eg TkAgg, WXAgg or QtAgg.

While debugging, it is helpful to create a simple script like

  import pylab
  pylab.plot([1,2,3])
  pylab.show()

and run it with

  > python myscript.py --verbose-helpful

which will show you which rc file is being loaded, which backend is
selected, what mpl version you are using, and so on.

Should help,
JDH

PS: the bug in pygtk2.4 in fedora core 3 is quite ease to fix. You
simply have to replace typename with another name like typename_ or
some other name as described in the FAQ.

Dear John,

Thanks for the help. Now it works!

Karsten.

···

On Tue, 2005-04-26 at 20:38 -0500, John Hunter wrote:

    > After that the build and install went smoothly. But now
    > if I try to import pylab I get the following error:
    > pixbuf_get_pixels_array ImportError: No module named
    > _nc_backend_gdk

    > As far as I can see it is still trying to use some
    > gtk-stuff?

This is a bit of annoyance in the mpl setup. The backend that is
chosen at runtime is determined by the rc file (see
http://matplotlib.sf.net/.matplotlibrc) and the default backend in the
rc file is GTKAgg. Even if you turn GTK compilation off in setup.py,
the rc file still determines which backend is selected. You need to
copy that file from its default location (eg
/usr/share/matplotlib/.matplotlibrc) to your HOME directory and edit
the 'backend' setting to something else, eg TkAgg, WXAgg or QtAgg.

While debugging, it is helpful to create a simple script like

  import pylab
  pylab.plot([1,2,3])
  pylab.show()

and run it with

  > python myscript.py --verbose-helpful

which will show you which rc file is being loaded, which backend is
selected, what mpl version you are using, and so on.

Should help,
JDH

PS: the bug in pygtk2.4 in fedora core 3 is quite ease to fix. You
simply have to replace typename with another name like typename_ or
some other name as described in the FAQ.