From: David T. <dl...@ca...> - 2009-01-21 22:09:22
|
Got it working using tkAgg by recompiling matplotlib from source. David On Jan 21 2009, David Trethewey wrote: >I have switched between python2.5 and 2.6, so maybe I've messed up the >installation somehow, and it's not looking for things in the right >directories. > >I fiddled around with the versions of cairo and pycairo, and got them to >match but still got errors: > >>>> import gtk >Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/usr/lib64/python2.6/site-packages/gtk-2.0/gtk/__init__.py", >line 48, in <module> > from gtk import _gtk >ImportError: /usr/lib64/libcairo.so.2: undefined symbol: >pixman_region32_rectangles > >Also using tk doesn't work either: > >>>> import pylab >Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/usr/lib64/python2.6/site-packages/pylab.py", line 1, in <module> > from matplotlib.pylab import * > File "/usr/lib64/python2.6/site-packages/matplotlib/pylab.py", line >253, in <module> > from matplotlib.pyplot import * > File "/usr/lib64/python2.6/site-packages/matplotlib/pyplot.py", line >75, in <module> > new_figure_manager, draw_if_interactive, show = pylab_setup() > File >"/usr/lib64/python2.6/site-packages/matplotlib/backends/__init__.py", >line 25, in pylab_setup > globals(),locals(),[backend_name]) > File >"/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_tkagg.py", >line 8, in <module> > import tkagg # Paint image to Tk photo blitter extension > File >"/usr/lib64/python2.6/site-packages/matplotlib/backends/tkagg.py", line >1, in <module> > import _tkagg >ImportError: No module named _tkagg > > >John Hunter wrote: >> On Wed, Jan 21, 2009 at 11:56 AM, Michael Droettboom <md...@st...> >> wrote: >>> I haven't seen this before, but it definitely looks like an installation >>> problem with pygtk and/or pycairo, since it fails without matplotlib >>> even entering into it. In particular, it looks like a possible mismatch >>> between the versions of pycairo and cairo. Is everything installed from >>> your distro's packages, or did you build this yourself? >>> >>> Until "import gtk" works, there's little matplotlib can do, >>> unfortunately. You may want to head over to the pygtk list for help if >>> you're still stuck. >>> >> >> Or simply set your backend to tkagg >> >> http://matplotlib.sourceforge.net/users/customizing.html >> http://matplotlib.sourceforge.net/faq/installing_faq.html#id1 >> >> JDH > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: SourcForge Community SourceForge wants > to tell your story. http://p.sf.net/sfu/sf-spreadtheword > _______________________________________________ Matplotlib-users mailing > list Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |