Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Tkinter for sage 5.0 on linux

I'm using sage 5.0 on Ubuntu Linux. I would like to use Tkinter but it fails. I have Tk installed (works from ordinary python) and the development libraries are installed.

Here's what happens:

sage: from Tkinter import *
ImportError                               Traceback (most recent call last)

/home/ers/<ipython console> in <module>()

/usr/lib/sage/local/lib/python2.7/lib-tk/ in <module>()
     37     # Attempt to configure Tcl/Tk without requiring PATH
     38     import FixTk
---> 39 import _tkinter # If this fails your Python may not be configured for Tk
     40 tkinter = _tkinter # b/w compat for export
     41 TclError = _tkinter.TclError

ImportError: No module named _tkinter

I tried the instructions here: but that didn't work.

I tried a more simple

sage -f python

and got this:

Calling sage-spkg on 'python'
Extracting package /usr/lib/sage/spkg/standard/python-2.7.2.p4.spkg
-rw-r--r-- 1 root root 107 May 14 19:57 /usr/lib/sage/spkg/standard/python-2.7.2.p4.spkg
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
Error: failed to extract /usr/lib/sage/spkg/standard/python-2.7.2.p4.spkg

Help please!

BTW: The from Tkinter import * works perfectly on my Mac.