I finally got py25-matplotlib installed. Like an earlier poster though I get a segfault with the TkAgg backend. Running under gdb gives me the barest of information though since nothing appears to be built with debug symbols enabled: #0 0x01f0bf40 in TclpFree () #1 0x01f0807e in ResetObjResult () #2 0x01fc08c6 in Tk_MainWindow () #3 0x01e832e0 in PyAggImagePhoto () #4 0x01eb5aeb in TclInvokeStringCommand () #5 0x0a010518 in TclEvalObjvInternal () #6 0x0a0108fb in Tcl_EvalObjv () #7 0x01aed848 in Tkapp_Call () #8 0x00234e5f in PyEval_EvalFrameEx () #9 0x00236baa in PyEval_EvalCodeEx () #10 0x002349c3 in PyEval_EvalFrameEx () #11 0x00236baa in PyEval_EvalCodeEx () #12 0x002349c3 in PyEval_EvalFrameEx () #13 0x00236baa in PyEval_EvalCodeEx () #14 0x001c41ea in function_call () #15 0x0019f922 in PyObject_Call () #16 0x00233021 in PyEval_EvalFrameEx () #17 0x00236baa in PyEval_EvalCodeEx () #18 0x001c41ea in function_call () #19 0x0019f922 in PyObject_Call () #20 0x001a8676 in instancemethod_call () #21 0x0019f922 in PyObject_Call () #22 0x0022e196 in PyEval_CallObjectWithKeywords () #23 0x01aebd4c in PythonCmd () #24 0x0a00d7cf in TclInvokeStringCommand () #25 0x0a010518 in TclEvalObjvInternal () #26 0x0a05839c in TclExecuteByteCode () #27 0x0a061088 in Tcl_ExprObj () #28 0x0a010de5 in Tcl_ExprBooleanObj () #29 0x0a01beb5 in Tcl_IfObjCmd () #30 0x0a010518 in TclEvalObjvInternal () #31 0x0a011645 in TclEvalEx () #32 0x0a011f3e in Tcl_EvalEx () #33 0x0b007f01 in Tk_BindEvent () #34 0x0b00de59 in TkBindEventProc () #35 0x0b0162fa in Tk_HandleEvent () #36 0x0b033c3a in TkDoConfigureNotify () #37 0x0b033da9 in Tk_MakeWindowExist () #38 0x0b033ee8 in Tk_MapWindow () #39 0x0b02a4b2 in ArrangePacking () #40 0x0a0ac658 in TclServiceIdle () #41 0x0a08e2ea in Tcl_DoOneEvent () #42 0x01aeb4f6 in Tkapp_MainLoop () #43 0x00234e5f in PyEval_EvalFrameEx () #44 0x00236baa in PyEval_EvalCodeEx () #45 0x002349c3 in PyEval_EvalFrameEx () #46 0x00236baa in PyEval_EvalCodeEx () #47 0x002349c3 in PyEval_EvalFrameEx () #48 0x00236baa in PyEval_EvalCodeEx () #49 0x00236cb7 in PyEval_EvalCode () #50 0x0025a8e4 in PyRun_InteractiveOneFlags () #51 0x0025ab23 in PyRun_InteractiveLoopFlags () #52 0x0025b329 in PyRun_AnyFileExFlags () #53 0x00269848 in Py_Main () #54 0x00001f7c in _start () #55 0x00001ea9 in start () Is this enough for someone to debug with? If not, how do I go about installing debug versions of the various packages? Is another interactive backend supported for matplotlib? Thx, -- Skip Montanaro - skip@pobox.com - http://www.webfast.com/~skip/
On Thu, Mar 6, 2008 at 12:28 PM, <skip@pobox.com> wrote:
I finally got py25-matplotlib installed. Like an earlier poster though I get a segfault with the TkAgg backend. Running under gdb gives me the barest of information though since nothing appears to be built with debug symbols enabled:
#0 0x01f0bf40 in TclpFree () #1 0x01f0807e in ResetObjResult () #2 0x01fc08c6 in Tk_MainWindow () #3 0x01e832e0 in PyAggImagePhoto () #4 0x01eb5aeb in TclInvokeStringCommand () #5 0x0a010518 in TclEvalObjvInternal () #6 0x0a0108fb in Tcl_EvalObjv () #7 0x01aed848 in Tkapp_Call () #8 0x00234e5f in PyEval_EvalFrameEx () #9 0x00236baa in PyEval_EvalCodeEx () #10 0x002349c3 in PyEval_EvalFrameEx () #11 0x00236baa in PyEval_EvalCodeEx () #12 0x002349c3 in PyEval_EvalFrameEx () #13 0x00236baa in PyEval_EvalCodeEx () #14 0x001c41ea in function_call () #15 0x0019f922 in PyObject_Call () #16 0x00233021 in PyEval_EvalFrameEx () #17 0x00236baa in PyEval_EvalCodeEx () #18 0x001c41ea in function_call () #19 0x0019f922 in PyObject_Call () #20 0x001a8676 in instancemethod_call () #21 0x0019f922 in PyObject_Call () #22 0x0022e196 in PyEval_CallObjectWithKeywords () #23 0x01aebd4c in PythonCmd () #24 0x0a00d7cf in TclInvokeStringCommand () #25 0x0a010518 in TclEvalObjvInternal () #26 0x0a05839c in TclExecuteByteCode () #27 0x0a061088 in Tcl_ExprObj () #28 0x0a010de5 in Tcl_ExprBooleanObj () #29 0x0a01beb5 in Tcl_IfObjCmd () #30 0x0a010518 in TclEvalObjvInternal () #31 0x0a011645 in TclEvalEx () #32 0x0a011f3e in Tcl_EvalEx () #33 0x0b007f01 in Tk_BindEvent () #34 0x0b00de59 in TkBindEventProc () #35 0x0b0162fa in Tk_HandleEvent () #36 0x0b033c3a in TkDoConfigureNotify () #37 0x0b033da9 in Tk_MakeWindowExist () #38 0x0b033ee8 in Tk_MapWindow () #39 0x0b02a4b2 in ArrangePacking () #40 0x0a0ac658 in TclServiceIdle () #41 0x0a08e2ea in Tcl_DoOneEvent () #42 0x01aeb4f6 in Tkapp_MainLoop () #43 0x00234e5f in PyEval_EvalFrameEx () #44 0x00236baa in PyEval_EvalCodeEx () #45 0x002349c3 in PyEval_EvalFrameEx () #46 0x00236baa in PyEval_EvalCodeEx () #47 0x002349c3 in PyEval_EvalFrameEx () #48 0x00236baa in PyEval_EvalCodeEx () #49 0x00236cb7 in PyEval_EvalCode () #50 0x0025a8e4 in PyRun_InteractiveOneFlags () #51 0x0025ab23 in PyRun_InteractiveLoopFlags () #52 0x0025b329 in PyRun_AnyFileExFlags () #53 0x00269848 in Py_Main () #54 0x00001f7c in _start () #55 0x00001ea9 in start ()
Is this enough for someone to debug with? If not, how do I go about installing debug versions of the various packages? Is another interactive backend supported for matplotlib?
There are the wxpython and gtk2 variants. Give those a try, this is a strange problem as I am unable to reproduce these segfaults on Intel Leopard. Cheers Adam
Adam> There are the wxpython and gtk2 variants. Give those a try, this Adam> is a strange problem as I am unable to reproduce these segfaults Adam> on Intel Leopard. I'll give the WXAgg backend a try. If you would like some help debugging the Tcl problems drop me a note (skip@pobox.com). Skip
On 06.03.2008, at 18:28, skip@pobox.com wrote:
Is another interactive backend supported for matplotlib?
I am happily using GTKagg with MacPort's python25 on Leopard. Greetings, Jochen -- Einigkeit und Recht und Freiheit http://www.Jochen-Kuepper.de Liberté, Égalité, Fraternité GnuPG key: CC1B0B4D Sex, drugs and rock-n-roll
>> Is another interactive backend supported for matplotlib? Jochen> I am happily using GTKagg with MacPort's python25 on Leopard. I tried that but get this traceback: % /opt/local/bin/python2.5 Python 2.5.2 (r252:60911, Mar 5 2008, 22:37:23) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from pylab import * Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/opt/local/lib/python2.5/site-packages/pylab.py", line 1, in <module> from matplotlib.pylab import * File "/opt/local/lib/python2.5/site-packages/matplotlib/pylab.py", line 292, in <module> from matplotlib.pyplot import * File "/opt/local/lib/python2.5/site-packages/matplotlib/pyplot.py", line 37, in <module> new_figure_manager, draw_if_interactive, show = pylab_setup() File "/opt/local/lib/python2.5/site-packages/matplotlib/backends/__init__.py", line 24, in pylab_setup globals(),locals(),[backend_name]) File "/opt/local/lib/python2.5/site-packages/matplotlib/backends/backend_gtkagg.py", line 10, in <module> from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK, FigureCanvasGTK,\ File "/opt/local/lib/python2.5/site-packages/matplotlib/backends/backend_gtk.py", line 21, in <module> from matplotlib.backends.backend_gdk import RendererGDK, FigureCanvasGDK File "/opt/local/lib/python2.5/site-packages/matplotlib/backends/backend_gdk.py", line 29, in <module> from matplotlib.backends._backend_gdk import pixbuf_get_pixels_array ImportError: No module named _backend_gdk Given that py25-matplotlib didn't depend on py25-gtk, my guess is that it wasn't built with Gtk support. How do I do that? Thx, -- Skip Montanaro - skip@pobox.com - http://www.webfast.com/~skip/
skip> File "/opt/local/lib/python2.5/site-packages/matplotlib/backends/backend_gdk.py", line 29, in <module> skip> from matplotlib.backends._backend_gdk import pixbuf_get_pixels_array skip> ImportError: No module named _backend_gdk skip> Given that py25-matplotlib didn't depend on py25-gtk, my guess is skip> that it wasn't built with Gtk support. How do I do that? Nevermind, I think. As it turns out if py25-gtk is already installed the matplotlib build process will recognize its availability. This is a bit confusing, especially since the installed port lists as py25-matplotlib @0.91.2_0+tkinter It would be kinda nice if it could somehow relay the fact that it also supports gtk. -- Skip Montanaro - skip@pobox.com - http://www.webfast.com/~skip/
On Thu, Mar 6, 2008 at 6:00 PM, <skip@pobox.com> wrote:
Nevermind, I think. As it turns out if py25-gtk is already installed the matplotlib build process will recognize its availability. This is a bit confusing, especially since the installed port lists as
py25-matplotlib @0.91.2_0+tkinter
It would be kinda nice if it could somehow relay the fact that it also supports gtk.
Due to the way that matplotlib build system works it would be very difficult to do what you suggest. The tkinter, wxpython and gtk variants setup up the default backends and ensure that the appropriate dependencies are installed. However, if you already have the py25-gtk installed, for example, then the matplotlib build system will find this and build the required backend even if you didn't specify the gtk variant. I'm open to suggestions if you can come up with a better way of doing this. Cheers Adam
Adam> The tkinter, wxpython and gtk variants ... This is the first I heard of different variants. I'm giving it a try now. Adam> I'm open to suggestions if you can come up with a better way of Adam> doing this. None. I'm just constantly amazed at the complexity of MacPorts (not always in a good way). -- Skip Montanaro - skip@pobox.com - http://www.webfast.com/~skip/
I'm just constantly amazed at the complexity of MacPorts (not always in a good way).
*sigh*... Here's one example: % sudo port uninstall py25-matplotlib ---> Deactivating py25-matplotlib 0.91.2_0+tkinter ---> Uninstalling py25-matplotlib 0.91.2_0+tkinter % sudo port install py25-matplotlib +gtk ---> Fetching py25-matplotlib ---> Verifying checksum(s) for py25-matplotlib ---> Extracting py25-matplotlib ---> Applying patches to py25-matplotlib ---> Configuring py25-matplotlib ---> Building py25-matplotlib with target build ---> Staging py25-matplotlib into destroot ---> Installing py25-matplotlib 0.91.2_0+tkinter ---> Activating py25-matplotlib 0.91.2_0+tkinter ---> Cleaning py25-matplotlib I asked for the gtk variant. Why was the tkinter variant installed? -- Skip Montanaro - skip@pobox.com - http://www.webfast.com/~skip/
On Mar 6, 2008, at 8:54 PM, skip@pobox.com wrote:
I'm just constantly amazed at the complexity of MacPorts (not always in a good way).
*sigh*... Here's one example:
% sudo port uninstall py25-matplotlib ---> Deactivating py25-matplotlib 0.91.2_0+tkinter ---> Uninstalling py25-matplotlib 0.91.2_0+tkinter % sudo port install py25-matplotlib +gtk ---> Fetching py25-matplotlib ---> Verifying checksum(s) for py25-matplotlib ---> Extracting py25-matplotlib ---> Applying patches to py25-matplotlib ---> Configuring py25-matplotlib ---> Building py25-matplotlib with target build ---> Staging py25-matplotlib into destroot ---> Installing py25-matplotlib 0.91.2_0+tkinter ---> Activating py25-matplotlib 0.91.2_0+tkinter ---> Cleaning py25-matplotlib
I asked for the gtk variant. Why was the tkinter variant installed?
There is no gtk variant (there is a gtk2 one, which may be what you wanted). That port is setup to automatically add +tkinter if a conflicting variant isn't set. -- Daniel J. Luke +========================================================+ | *---------------- dluke@geeklair.net ----------------* | | *-------------- http://www.geeklair.net -------------* | +========================================================+ | Opinions expressed are mine and do not necessarily | | reflect the opinions of my employer. | +========================================================+
participants (5)
-
Adam Mercer
-
Adam Mercer
-
Daniel J. Luke
-
Jochen Küpper
-
skip@pobox.com