There are a number of different packages that enable GUIs in Python.   TKinter is not perfect but it is installed as standard which makes it a handy choice for schools.   These are some notes on creating GUIs and Games in Python using TKinter.


TKinter seems to be installed as standard and it’s availability can be confirmed by typing:

import _tkinter # with underscore, and lowercase 't'

If this works then try on of the following depending on your version

import Tkinter # no underscore, uppercase 'T' for versions prior to V3.0

import tkinter # no underscore, lowercase 't' for V3.0 and later

Finally once you have determined that you can import tkinter try running a small text GUI with one of the following:

Tkinter._test() # note underscore in _test and uppercase 'T' for versions prior to V3.0 tkinter._test() # note underscore in _test and lowercase 'T' for V3.0 and later

For more information see the Checking tkinter support section on the tkinter homepage.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.