Running the demo in matplotlib
Frank Schima
macsforever2000 at macports.org
Mon May 5 07:22:39 PDT 2008
Hi all,
I'm attempting to run the demo for matplotlib but I'm running into
problems.
First I tried this (use Tkinter):
python subplot_demo.py -dTk
But I got a run time error:
$ python subplot_demo.py -dTk
Exception in Tkinter callback
Traceback (most recent call last):
File "/opt/local/lib/python2.5/lib-tk/Tkinter.py", line 1403, in
__call__
return self.func(*args)
File "/opt/local/lib/python2.5/site-packages/matplotlib/backends/
backend_tkagg.py", line 188, in resize
self.show()
File "/opt/local/lib/python2.5/site-packages/matplotlib/backends/
backend_tkagg.py", line 192, in draw
tkagg.blit(self._tkphoto, self.renderer._renderer, colormode=2)
File "/opt/local/lib/python2.5/site-packages/matplotlib/backends/
tkagg.py", line 15, in blit
tk.call("PyAggImagePhoto", photoimage, id(aggimage), colormode,
id(bbox))
TclError
My tcl/tk is only at version 8.4 so maybe that's the problem. I need
tcl/tk 8.4 in order to run blt.
Second try (GTK):
$ python subplot_demo.py -dGTK
Traceback (most recent call last):
File "subplot_demo.py", line 2, in <module>
from pylab import *
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_gtk.py", line 6, in <module>
import gobject
ImportError: No module named gobject
Maybe this is also due to my old tcl/tk version.
So 3rd try (wx):
$ python subplot_demo.py -dGTK
Traceback (most recent call last):
File "subplot_demo.py", line 2, in <module>
from pylab import *
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_gtk.py", line 6, in <module>
import gobject
ImportError: No module named gobject
817fsmac:examples schimaf$ python subplot_demo.py -dWX
This program needs access to the screen.
Please run with 'pythonw', not 'python', and only when you are logged
in on the main display of your Mac.
Any ideas how to get this running using any of the GUIs? For now,
updating tcl/tk to 8.5 is not an option because I need blt. I'm
looking at matplotlib as a replacement for it though. I was going to
try to evaluate it.
Cheers!
Frank Schima
Boulder, CO
More information about the macports-users
mailing list