On Mon, Jan 12, 2009 at 8:44 AM, Mauro Cavalcanti <mauro...@gmail.com>wrote:
> Dear ALL,
>
> I just found the following error when trying to run a very simple test
> MPL/Basemap script under Ubuntu Linux Intrepid. This does *not* happen
> when not importing MPL pyplot (for example, in a wxPython embedded
> app).
>
> Traceback (most recent call last):
> File "/home/maurobio/Projetos/Croizat/test/mexico.py", line 2, in <module>
> import matplotlib.pyplot as plt
> File
> "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.1-py2.5-linux-i686.egg/matplotlib/pyplot.py",
> line 75, in <module>
> new_figure_manager, draw_if_interactive, show = pylab_setup()
> File
> "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.1-py2.5-linux-i686.egg/matplotlib/backends/__init__.py",
> line 25, in pylab_setup
> globals(),locals(),[backend_name])
> File
> "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.1-py2.5-linux-i686.egg/matplotlib/backends/backend_gtkagg.py",
> line 10, in <module>
> from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK,
> FigureCanvasGTK,\
> File
> "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.1-py2.5-linux-i686.egg/matplotlib/backends/backend_gtk.py",
> line 25, in <module>
> from matplotlib.backends.backend_gdk import RendererGDK, FigureCanvasGDK
> File
> "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.1-py2.5-linux-i686.egg/matplotlib/backends/backend_gdk.py",
> line 29, in <module>
> from matplotlib.backends._backend_gdk import pixbuf_get_pixels_array
> ImportError: libffi.so.4: cannot open shared object file: No such file
> or directory
>
> Any hints??? I am near panic now...
>
No need to panic. It looks like your default backend has been set to gtkagg.
I think you just need to set your backend to wxagg in your matplotlibrc
file: http://matplotlib.sourceforge.net/users/customizing.html
P.S. pyplot should not be used in an embedded environment, that interface is
meant for command line and scripting use. For embedded applications, you
should use the object-oriented interface. There are several wx examples at
http://matplotlib.sourceforge.net/examples/user_interfaces/index.html
------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users