From: John W. <jd...@go...> - 2004-03-05 17:11:30
|
I am using the latest CVS release of matplotlib from sourceforge, and when I try to run the wx backend example I get gyrotwystron examples # python embedding_in_wx.py Could not import mathtext (build with ft2font) GThread-ERROR **: GThread system may only be initialized once. aborting... Aborted The gtk backend examples work fine (although I still get the mathtext warning). I have python 2.3 and wxPython 2.4.2.4 on a gentoo linux system. Thanks! jgw |
From: John H. <jdh...@ac...> - 2004-03-06 16:33:03
|
>>>>> "John" == John Wohlbier <jd...@go...> writes: John> I am using the latest CVS release of matplotlib from John> sourceforge, and when I try to run the wx backend example I John> get John> gyrotwystron examples # python embedding_in_wx.py Could not John> import mathtext (build with ft2font) John> GThread-ERROR **: GThread system may only be initialized John> once. aborting... Aborted John> The gtk backend examples work fine (although I still get the John> mathtext warning). I have python 2.3 and wxPython 2.4.2.4 on John> a gentoo linux system. Not sure why you get this - Jeremy may be working on porting mathtext to WX. The 0.51 release is quite current, so unless you are looking for a specific feature from CVS I suggest you use that distribution since there are extra problems you'll encounter trying to build from CVS (see my last response to Andrew for details). If you want to clear up the cannot import mathtext problem, set BUILD_FT2FONT to True in setup.py before building. JDH |
From: John W. <jd...@go...> - 2004-03-08 15:38:39
|
I get the error even using 0.51. Maybe my wxPython is broken. Do you know of a way I can test it? Thanks. jgw >John> I am using the latest CVS release of matplotlib from >John> sourceforge, and when I try to run the wx backend example I >John> get > >John> gyrotwystron examples # python embedding_in_wx.py Could not >John> import mathtext (build with ft2font) > >John> GThread-ERROR **: GThread system may only be initialized John> > once. aborting... Aborted > >John> The gtk backend examples work fine (although I still get the >John> mathtext warning). I have python 2.3 and wxPython 2.4.2.4 on >John> a gentoo linux system. > > Not sure why you get this - Jeremy may be working on porting mathtext to > WX. The 0.51 release is quite current, so unless you are looking for a > specific feature from CVS I suggest you use that distribution since > there are extra problems you'll encounter trying to build from CVS (see > my last response to Andrew for details). > > If you want to clear up the cannot import mathtext problem, set > BUILD_FT2FONT to True in setup.py before building. > > JDH |
From: John H. <jdh...@ac...> - 2004-03-08 15:50:20
|
>>>>> "John" == John Wohlbier <jd...@go...> writes: 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 |
From: John W. <jd...@go...> - 2004-03-08 16:09:34
|
I have been running from the prompt all along. The command line is: wohlbier@gyrotwystron examples $ python embedding_in_wx.py Could not import mathtext (build with ft2font) GThread-ERROR **: GThread system may only be initialized once. aborting... Aborted wohlbier@gyrotwystron examples $ If running from the command line, does .matplotlibrc make a difference? I did set the default backend in this file to WX. I am on gentoo linux, python 2.3.3, wxPython 2.4.1.2, matplotlib 0.51, executing from the command line as above, from the directory /usr/lib/python2.3/site-packages/matplotlib-0.51/examples/ Let me know if you need something more about my setup. 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 |
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 |
From: John H. <jdh...@ac...> - 2004-03-08 16:37:32
|
>>>>> "John" == John Wohlbier <jd...@go...> writes: John> Another clue, when I try another example with wx I get: John> wohlbier@gyrotwystron examples $ python dynamic_demo_wx.py John> Traceback (most recent call last): File John> "dynamic_demo_wx.py", line 34, in ? from John> matplotlib.backends import Figure, Toolbar, FigureManager John> ImportError: cannot import name Figure wohlbier@gyrotwystron John> examples $ John> Does this mean anything? Well, it appears dynamic_demo_wx has not been updated to the latest API. Ignore this one for now. What happens when you do > python2.3 simple_plot.py -dWX Does it help to do > python2.3 embedding_in_wx.py -dWX It shouldn't because you have selected wx as your default backend in matplotlibrc, but I find your problem a little mysterious so I'm grasping here. Please send me the embedding_in_wx.py you are trying to run as an attachement so I can see if I can replicate it on my system. JDH |