[Tutor] tkinter

Alan Gauld alan.gauld at yahoo.co.uk
Sun Sep 30 03:47:32 EDT 2018


On 30/09/18 02:22, Jorge Herrera wrote:
> Hello, I'm new to Python and I've been having a frustrating time with
> python because I'm trying to import tkinter and it's saying that tkinter is
> not defined, that it doesn't exist 

That suggests that Tkinter is not installed on your system.
What OS are you using?

If it is Linux then its common that you have to install tkinter
separately from the basic python package. Its usually called
python-tkinter or somesuch in the package manager.
Be sure to match the version number with your Python version.

If its MacOS then the system python doesn't (or didn't last
time I tried)  come with tkinter so you need to download
the latest MacOS python installer and install it (Do not
uninstall the system version though - the OS needs it!)

On Windows tkinter should be present.

If the suggestions above don't work then come back to
us with more details:
- Your OS
- Your Python version
- A cut n' paste of the full error message that you get

HTH
-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list