Discussion:
[Tutor] tkinter in Python 3
Michael Thomas
2015-08-27 17:21:54 UTC
Permalink
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. While this command works, there is no
difference in the result. This problem has only cropped up after I changed
to Ubuntu 15.04. Does anyone have any suggestions?
Thanks in advance for any help.
Mike
_______________________________________________
Tutor maillist - ***@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Rohan S
2015-08-27 21:29:52 UTC
Permalink
I am trying to download a version of Pygame that is compatible with Python
2.7.10; when I try to run a simple program, I get an error message stating
that terms like "livewires", "Sprite", "pygame", and "screen", are
unresolved references, and so I assume that downloading pygame could solve
this problem. However, even after I downloaded it, the same messages still
appear. Might anyone have any alternatives or suggestions?

Thank you very much,
Rohan
Post by Michael Thomas
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. While this command works, there is no
difference in the result. This problem has only cropped up after I changed
to Ubuntu 15.04. Does anyone have any suggestions?
Thanks in advance for any help.
Mike
_______________________________________________
https://mail.python.org/mailman/listinfo/tutor
_______________________________________________
Tutor maillist - ***@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Alan Gauld
2015-08-27 21:35:33 UTC
Permalink
Post by Rohan S
I am trying to download a version of Pygame that is compatible with Python
2.7.10;
While a similar problem it would have been better to start a new thread.
These are quite different problems. However...
Post by Rohan S
when I try to run a simple program, I get an error message stating
that terms like "livewires", "Sprite", "pygame", and "screen", are
unresolved references, and so I assume that downloading pygame could solve
this problem.
Maybe, but the mention of Livewires suggests you may be following
the Michael Dawson book? If so he has download instructions in
the book for a specific copy of Livewires that matches the
code examples. I recommend you use the version he suggests.

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


_______________________________________________
Tutor maillist - ***@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Alan Gauld
2015-08-27 21:32:26 UTC
Permalink
Post by Michael Thomas
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


_______________________________________________
Tutor maillist - ***@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Loading...