|
From: John W. <jd...@go...> - 2004-03-08 16:16:19
|
Another clue, when I try another example with wx I get:
wohlbier@gyrotwystron examples $ python dynamic_demo_wx.py
Traceback (most recent call last):
File "dynamic_demo_wx.py", line 34, in ?
from matplotlib.backends import Figure, Toolbar, FigureManager
ImportError: cannot import name Figure
wohlbier@gyrotwystron examples $
Does this mean anything?
jgw
>
> John> I get the error even using 0.51. Maybe my wxPython is
> John> broken. Do you know of a way I can test it?
>
> The example runs fine on my systm.
>
> Something funny is going on. wx does not attempt to load mathtext,
> either in 0.51 or in CVS. That, and the fact that you are getting a
> gthread error, make me suspect you are actually loading the gtk
> backend.
>
> Are you trying to run embedding_in_wx from the prompt or from a
> development environment such as pycrust? If you run from the prompt,
> you shouldn't see that error. If not, you may be loading the default
> backend (GTK) first in your development environment and then trying to
> run embedding_in_wx.
>
> For example, if you first import matplotlib and later try to run
> embedding_in_wx in the same python/pycrust session, you will get
> yourself into a world of trouble, since the default import loads GTK and
> the second one WX. These two cannot peacefully coexist.
>
> Try running the examples from the linux shell or DOS prompt first. Have
> you read the information about how to select the various backends on
> http://matplotlib.sourceforge.net/backends.html?
>
> You can change your default backend (eg to WX) in you .matplotlibrc
> file.
>
> http://matplotlib.sourceforge.net/faq.html#MATPLOTLIBRC
> http://matplotlib.sourceforge.net/.matplotlibrc
>
> If you still encounter problems, please tell me exactly what you are
> doing: what platform, how you are trying to run the example etc...
>
> Hope this helps,
> JDH
|