tkinter on Leap 15.1

34 views
Skip to first unread message

Ricksme

unread,
Jan 7, 2020, 4:06:27 AM1/7/20
to sage-support
I am about to build sage 9.0 on opensuse Leap 15.1 and notice that import Tkinter works in python 2.7.14 but that import tkinter is required for python 3.6.9 (Leap 15.1 installation). The sage 9.0 installation guide specifies the (uppercase T) Tkinter which applies to python 2 in my installation but sage 9.0 is built with python 3. Is this going to be an issue and does someone know about this?

dim...@gmail.com

unread,
Jan 7, 2020, 4:15:08 AM1/7/20
to 'Ricksme' via sage-support
That Tkinter -> tkinter change at py2 -> py3 could have been something
we overlooked, as probably noone involved in Sage releases has any idea
about tkinter.

So it seems you might be on your own at this point, sorry. Please keep us
informed on your progress, so that we can update the guide, if needed.

Thanks
Dmitrii
signature.asc

slelievre

unread,
Jan 8, 2020, 8:47:17 AM1/8/20
to sage-support


Le mardi 7 janvier 2020 10:15:08 UTC+1, dim...@gmail.com a écrit :
On Mon, Jan 06, 2020 at 05:54:02PM -0800, 'Ricksme' via sage-support wrote:
> I am about to build sage 9.0 on opensuse Leap 15.1 and notice that import
> Tkinter works in python 2.7.14 but that import tkinter is required for
> python 3.6.9 (Leap 15.1 installation). The sage 9.0 installation guide
> specifies the (uppercase T) Tkinter which applies to python 2 in my
> installation but sage 9.0 is built with python 3. Is this going to be an
> issue and does someone know about this?

That Tkinter -> tkinter change at py2 -> py3 could have been something
we overlooked, as probably noone involved in Sage releases has any idea
about tkinter.

We should indeed adapt that section of the "install from source" page at


I guess that to check support for Tk interface it's enough to try

    import _tkinter

In Python 2, import Tkinter will import _tkinter.
In Python 3, import tkinter will import _tkinter.

Ricksme

unread,
Jan 8, 2020, 12:47:58 PM1/8/20
to sage-support
import _tkinter works for both 2 and 3.
import Tkinter for python 2  OR import tkinter for python 3

I haven't checked whether there is code within the sage-9.0 installation that uses this import statement. If there is, presumably the correct version of import tkinter is employed.

Rick

Message has been deleted

Ricksme

unread,
Jan 8, 2020, 4:48:10 PM1/8/20
to sage-support


On Wednesday, 8 January 2020 13:47:17 UTC, slelievre wrote:
I think the one line is adequate to check for support; problem solved.

Is testing the installation  out of context for the installation document?
If testing is required, both import lines could be followed by a test

import _tkinter
import tkinter
tkinter._test()

 
Reply all
Reply to author
Forward
0 new messages