Do you have the tk-devel packages installed? When you run setup.py, there is a 
report at the beginning which lists all the required and optional 
dependencies, would you post that?

On Friday 21 March 2008 08:52:40 am fiacre wrote:
> I agree -- I don't believe it built correctly either ...
>
> Python 2.5.1 (r251:54863, Mar 20 2008, 04:03:41)
> [GCC 3.4.5 (Gentoo 3.4.5-r1, ssp-3.4.5-1.0, pie-8.7.9)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>
>  >>> from matplotlib.backends import _tkagg
>  >>> _tkagg.__file__
>
> '/usr/lib/python2.5/site-packages/matplotlib/backends/_tkagg.pyc'
>
>  >>> dir(_tkagg)
>
> ['AxisMenu', 'Figure', 'FigureCanvasAgg', 'FigureCanvasBase',
> 'FigureCanvasTkAgg', 'FigureManager', 'FigureManagerBase',
> 'FigureManagerTkAgg', 'FileDialog', 'Gcf', 'GraphicsContextBase',
> 'NavigationToolbar', 'NavigationToolbar2', 'NavigationToolbar2TkAgg',
> 'PIXELS_PER_INCH', 'RendererBase', 'SubplotTool', 'Tk', '__builtins__',
> '__doc__', '__file__', '__name__', 'asarray', 'backend_version',
> 'cursord', 'cursors', 'division', 'draw_if_interactive', 'enumerate',
> 'error_msg_tkpaint', 'is_string_like', 'math', 'matplotlib',
> 'new_figure_manager', 'os', 'raise_msg_to_str', 'rcParams', 'round',
> 'show', 'sys', 'tkagg', 'verbose', 'windowing']
>
>
>
> I don't see anything obviously wrong though -- I am wondering if my X
> setup is faulty.
>
> Thanks!
>
> Michael Droettboom wrote:
> > It looks like the _tkagg C extension didn't build correctly -- it
> > really should have a tkinit method.
> >
> > Can you please try the following and send me the output (inside the
> > Python interpreter)...
> >
> > >>> from matplotlib.backends import _tkagg
> > >>> _tkagg.__file__
> > >>> dir(_tkagg)
> >
> > Thanks!
> >
> > Mike
> >
> > fiacre wrote:
> >> I'm running Idle via X forwarding to my Windows desktop (running
> >> Cygwin).
> >>
> >> I've installed tcl/tk and python with Tkinter as a backend.
> >>
> >> When I call pylab.show(),  I always get the error :
> >>  >>> pylab.show()
> >>
> >> Exception in Tkinter callback
> >> Traceback (most recent call last):
> >>   File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 1403, in __call__
> >>     return self.func(*args)
> >>   File
> >> "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_tkagg.py",
> >> line 151, in resize
> >>     self.show()
> >>   File
> >> "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_tkagg.py",
> >> line 155, in draw
> >>     tkagg.blit(self._tkphoto, self.renderer._renderer, colormode=2)
> >>   File
> >> "/usr/lib/python2.5/site-packages/matplotlib/backends/tkagg.py", line
> >> 14, in blit
> >>     _tkagg.tkinit(id(tk), 0)
> >> AttributeError: 'module' object has no attribute 'tkinit'
> >>
> >>
> >> And an empty matplotlib window opens on my desktop.
> >>
> >>
> >> Should I try gtk as a backend???
> >>
> >> TIA
> >>
> >> -- Andrew
> >>
> >> ------------------------------------------------------------------------
> >>-
> >>
> >> This SF.net email is sponsored by: Microsoft
> >> Defy all challenges. Microsoft(R) Visual Studio 2008.
> >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> >> _______________________________________________
> >> Matplotlib-devel mailing list
> >> Matplotlib-devel@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Matplotlib-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel



-- 
Darren S. Dale, Ph.D.
Staff Scientist
Cornell High Energy Synchrotron Source
Cornell University
275 Wilson Lab
Rt. 366 & Pine Tree Road
Ithaca, NY 14853

[EMAIL PROTECTED]
office: (607) 255-3819
fax: (607) 255-9001
http://www.chess.cornell.edu

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to