[Tutor] tkinter in Python 3

Alan Gauld alan.gauld at btinternet.com
Thu Aug 27 23:32:26 CEST 2015


On 27/08/15 18:21, Michael Thomas wrote:
> I'm trying to move a Python 2.x program to Python 3.x. When I try to import
> tkinter I get the error message that no module _tkinter can be found. I've
> tried sudo apt-get install python-tk.

Thats the Python2 version

Try

apt-get install python3-tk

Note that there are a lot of changes in Tkinter in Python 3,
the modules are drastically rearranged and renamed.
Good luck.

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