Hal Huntley wrote:
> Thanks to Eric Firing and Christopher Barker for input on trying to
> resolve the problem.  Christopher said:
> %%%
> You might try just:
> 
> easy_install numpy
> 
> easy_install matplotlib.
> %%%
> 
> 
> I did that and now the problem moved and I get:
> ===
>>>> from pylab import *
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File
>   
> "/usr/lib/python2.4/site-packages/matplotlib-0.90.1-py2.4-linux-i686.egg/pylab.py",
>  line 1, in ?
>     from matplotlib.pylab import *
>   File
>   
> "/usr/lib/python2.4/site-packages/matplotlib-0.90.1-py2.4-linux-i686.egg/matplotlib/pylab.py",
>  line 222, in ?
>     new_figure_manager, draw_if_interactive, show = pylab_setup()
>   File
>   
> "/usr/lib/python2.4/site-packages/matplotlib-0.90.1-py2.4-linux-i686.egg/matplotlib/backends/__init__.py",
>  line 24, in pylab_setup
>     globals(),locals(),[backend_name])
>   File
>   
> "/usr/lib/python2.4/site-packages/matplotlib-0.90.1-py2.4-linux-i686.egg/matplotlib/backends/backend_gtkagg.py",
>  line 10, in ?
>     from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK,
>     FigureCanvasGTK,\
>   File
>   
> "/usr/lib/python2.4/site-packages/matplotlib-0.90.1-py2.4-linux-i686.egg/matplotlib/backends/backend_gtk.py",
>  line 21, in ?
>     from matplotlib.backends.backend_gdk import RendererGDK, FigureCanvasGDK
>   File
>   
> "/usr/lib/python2.4/site-packages/matplotlib-0.90.1-py2.4-linux-i686.egg/matplotlib/backends/backend_gdk.py",
>  line 35, in ?
>     from matplotlib.backends._ns_backend_gdk import pixbuf_get_pixels_array
> ImportError: No module named _ns_backend_gdkd4
> ===

Is it a rotten egg?

> 
> Googling around has indicated that the X11 stuff wasn't available when the
> numpy and matplotlib were made. The gtk files and "-devel" seem to be there
> when I do an "rpm -qa".  I went and got a new numpy from source and did
> "python setup.py install".  It is interesting that when I get in to python
> now, I can do:
> 
>>>> import gtk
>>>> import numpy
>>>> import matplotlib
> 
> and they all just return the prompt, indicating, I thought, that the
> programs were installed ok.  
> 
> Here is the naive question ->  Is there something wrong, then with a
> "from pylab import *"? The user is trying to do that. 

No, that should work fine.  I don't know how the egg-based 
matplotlib/pylab should work with the installed-from-source numpy, 
though.  If the versions are compatible, then I expect it would work.

You gave a traceback resulting from "from pylab import *" after 
installing the two eggs, correct?  If so, what was the result after you 
installed numpy from source?  I would expect no difference, because the 
problem reported in the traceback is a missing matplotlib module, not a 
missing numpy module.

Or did you mean that you installed matplotlib from source?  That would 
make more sense, and certainly should work if all the right header files 
and libraries are present.

If you installed matplotlib from source, what do you get from
ls /usr/lib/python2.4/site-packages/matplotlib/backends/*.so

Another diagnostic would be to delete the build directory from the 
matplotlib source tree (assuming you are now building matplotlib from 
source), and save the output from the "python setup.py build" command. 
This should make it clear whether the necessary headers really were found.

Eric

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to