It looks like EPD's version of matplotlib wasn't built with the _tkagg
extension (it is an optional component). This e-mail thread [1] seems
to suggest that it has gone in and out of EPD (though it's supposed to
be back in 6.0). Of course, I don't usually run EPD or Windows myself,
so I'm completely guessing, and am not trying to point fingers at the
hard working guys at Enthought.
[1]
http://markmail.org/message/e2g4kubwb7xkgyuo#query:epd%20python%20tkagg+page:1+mid:e2g4kubwb7xkgyuo+state:results
However, you may want to ask this question in an EPD support forum to
see what they say.
Mike
Bradley Minch wrote:
> Hi everyone,
>
> I would like to develop a Tkinter GUI application for a course that I am teaching this semester that has an embedded matplotlib plot. I was hoping to have this application work with both the Mac OS X and Windows versions of Enthought Python Distribution v. 6.0.0. As a starting point, I was going to try the user interface examples, embedding_in_tk.py and embedding_in_tk2.py, on the matplotlib website. I have changed my default backend from WXAgg to TkAgg in my matplotlibrc file. With the Mac OS X version of EPD 6.0.0, the examples seem to work just fine. However, with the Windows version, I get the following import error:
>
> C:\Documents and Settings\bminch\Desktop>python embedding_in_tk2.py
> Traceback (most recent call last):
> File "embedding_in_tk2.py", line 6, in <module>
> from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationT
> oolbar2TkAgg
> File "C:\Python26\lib\site-packages\matplotlib\backends\backend_tkagg.py", lin
> e 8, in <module>
> import tkagg # Paint image to Tk photo blitter extension
> File "C:\Python26\lib\site-packages\matplotlib\backends\tkagg.py", line 1, in
> <module>
> import _tkagg
> ImportError: No module named _tkagg
>
> C:\Documents and Settings\bminch\Desktop>
>
> The same thing happens when I invoke ipython with the -pylab option, although with a traceback that is a bit longer. At the bottom of it is the same import error, "No module named _tkagg."
>
> Has anyone experienced similar problems with the TkAgg backend under the Windows version of EPD 6.0.0? Can anyone suggest how to fix the problem?
>
> Thanks,
> Brad Minch.
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
|