Dear John & Darren,
Thanks for your reply -- the "panic" I alluded for is simply the
result of three months' strain working day-by-day to develop a very
large application using wxPython/MPL/Basemap under Linux, along with a
RAM crash and, more recently, an upgrade form Ubuntu 8.04 (Hardy
Heron) to Ubuntu 8.10 (Intrepid Ibex -- I love the fondness the guys
at Canonical have for zoology).
Well, that said, here are my reply to the questions and comments:
1) I am not using pyplot in an embedded environment. Indeed,
MPL/Basemap is running very well embedded in my wxPython application,
*without* pyplot of course. The reported error appears only when I try
any test script using pyplot (these scripts are useful for testing
ideas in an interpreted language as Python, before putting them to
work in a GUI application). My application uses the wxagg backends,
which are work well.
2) All scripts using pyplot ran quite well under Ubuntu Hardy; they
are just presenting these issues after I upgraded to Intrepid (which,
BTW, looks much more stable in my system than was Hardy -- except for
this problem with MPL)
3) I am running MPL 0.98.5.1, installed with Ubuntu itself. I ran sudo
easy_install matplotlib in an attempt to install version 0.98.5.2, but
this gave no result (easy_Install tells me that I already have the
latest version of MPL)
Well, I have googled the error message: "ImportError: libffi.so.4:
cannot open shared object file: No such file or directory" and it
seems that a few other Python applications are crashing with this
error under Ubuntu Intrepid (but I could not find any solution, just
I am not sure if compiling from source would help in this case,
because the error seems to be related to a missing system (?) library
and not to MPL or any of the backends.
So, for the time being, it looks that I cannot use MPL with pyplot
anymore, which is not entirely a huge problem (as I do not use the
library in MATLAB-style anyway) , but prevents me to use it to fast
testing of Basemap scripts.
With best regards,
2009/1/12 John Hunter <jdh2358@...287...>:
On Mon, Jan 12, 2009 at 7:44 AM, Mauro Cavalcanti <maurobio@...287...> wrote:
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
Traceback (most recent call last):
from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK,
line 25, in <module>
from matplotlib.backends.backend_gdk import RendererGDK, FigureCanvasGDK
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
Any hints??? I am near panic now...
No one ever made a dime by panicking
Did you compile mpl yourself or are you using a prepackaged version?
If you are using the ubuntu package of mpl, this is likely a bug with
the package and should be reported to ubuntu. If you compiled
yourself, what version are you using? Can you attach the output of a
clean build process?
Note that the problem appears in the gtk backend, so if it turns out
to be an ubuntu problem and you need a solution right away, you should
be able to use a different backend, eg tkagg, but please take the time
to report it to the ubuntu package maintainer if it has not been
already. It looks like it is related to this debian bug
I've CCd Sandro (the debian, not the ubuntu, maintainter) who may have
Dr. Mauro J. Cavalcanti
P.O. Box 46521, CEP 20551-970
Rio de Janeiro, RJ, BRASIL
Linux Registered User #473524 * Ubuntu User #22717
"Life is complex. It consists of real and imaginary parts."