From: Barry D. <bl...@ad...> - 2004-08-09 18:07:23
|
Update to my previous post: When I use the command line to use WXAgg, I receive the following traceback: >>> import matplotlib >>> matplotlib.use("WXAgg") >>> from matplotlib.matlab import * Traceback (most recent call last): File "<stdin>", line 1, in ? File "C:\Python23\Lib\site-packages\matplotlib\matlab.py", line 144, in ? from backends import new_figure_manager, error_msg, \ File "C:\Python23\Lib\site-packages\matplotlib\backends\__init__.py", line 39, in ? from backend_wxagg import \ File "C:\Python23\Lib\site-packages\matplotlib\backends\backend_wxagg.py", line 20, in ? from backend_wx import FigureManager File "C:\Python23\Lib\site-packages\matplotlib\backends\backend_wx.py", line 116, in ? wxapp = wxPySimpleApp() NameError: name 'wxPySimpleApp' is not defined This means that it gets past the try-except in backend_wx.py, but can't find wxPySimpleApp. In the previous post, when runing the code from a file, the exception was caught and a sysexit() occurred. I don't understand why in one case the exception is caught and not in the other. In either case, I'm still unable to use the wx backend. Thanks. Barry Drake --- Barry Drake wrote: > Having a problem with the WX backend; details > follow. > > I have wxPython 2.5 and > matplotlib-0.60.2.win32-py2.3 > installed. > > My code snippet: > import matplotlib > matplotlib.use("WXAgg") > from matplotlib.matlab import * > > Error msg: > Matplotlib backend_wx requires wxPython be installed > > Code snippet from: > C:\Python23\Lib\site-packages\matplotlib\backends\backend_wx.py > try: > from wxPython.wx import * > except: > print >>sys.stderr, "Matplotlib backend_wx > requires wxPython be installed" > sys.exit() > > I receive the following traceback when I try to > invoke > this from the command line: > > Enthought Edition build 1057 > Python 2.3.3 (#51, Feb 16 2004, 04:07:52) [MSC > v.1200 > 32 bit (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for > more information. > >>> from wxPython.wx import * > Traceback (most recent call last): > File "<stdin>", line 1, in ? > File > "C:\Python23\lib\site-packages\wxPython\__init__.py", > line 10, in ? > import _wx > File > "C:\Python23\Lib\site-packages\wxPython\_wx.py", > line > 3, in ? > from core import * > File > "C:\Python23\Lib\site-packages\wxPython\core.py", > line > 15, in ? > import wx.core > File > "C:\Python23\lib\site-packages\wxPython\wx.py", > line 4, in ? > from misc import * > File > "C:\Python23\lib\site-packages\wxPython\misc.py", > line > 15, in ? > import wx.misc > File > "C:\Python23\lib\site-packages\wxPython\wx.py", > line 6, in ? > from misc2 import * > File > "C:\Python23\lib\site-packages\wxPython\misc2.py", > line 4, in ? > from windows import * > File > "C:\Python23\lib\site-packages\wxPython\windows.py", > line 15, in ? > import wx.windows > File > "C:\Python23\lib\site-packages\wxPython\wx.py", > line 10, in ? > from gdi import * > File > "C:\Python23\lib\site-packages\wxPython\gdi.py", > line > 15, in ? > import wx.gdi > File > "C:\Python23\lib\site-packages\wxPython\wx.py", > line 12, in ? > from fonts import * > File > "C:\Python23\lib\site-packages\wxPython\fonts.py", > line 120, in ? > class wxFontPtr(wxObjectPtr): > NameError: name 'wxObjectPtr' is not defined > > code snippet from: > C:\Python23\Lib\site-packages\wxPython\fonts.py > class wxFontPtr(wxObjectPtr): > > This doesn't seem to be a problem specific to > matplotlib. But, I'm wondering if anyone has > already solved this or I'm just missing something. > > Thanks. > Barry Drake > > > > ------------------------------------------------------- > This SF.Net email is sponsored by OSTG. Have you > noticed the changes on > Linux.com, ITManagersJournal and NewsForge in the > past few weeks? Now, > one more big change to announce. We are now OSTG- > Open Source Technology > Group. Come see the changes on the new OSTG site. > www.ostg.com > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |