Skip to content

Instantly share code, notes, and snippets.

@sureshvv
Created August 17, 2018 11:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sureshvv/448a40457470d57f94edf56e59ab84de to your computer and use it in GitHub Desktop.
Save sureshvv/448a40457470d57f94edf56e59ab84de to your computer and use it in GitHub Desktop.
Python and Tkinter
03:59:23:~/simplegui$ sudo apt-get install python-tk
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-tk is already the newest version (2.7.15~rc1-1).
python-tk set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
04:40:39:~/simplegui$ sudo apt-get install python3-tk
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-tk is already the newest version (3.6.5-3).
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
04:40:48:~/simplegui$ python
Python 2.7.11 (default, Jun 13 2016, 12:01:09)
[GCC 5.3.1 20160413] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named tkinter
>>> import _tkinter
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named _tkinter
>>>
04:41:11:~/simplegui$ python3
Python 3.5.0 (default, Nov 19 2015, 13:47:18)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/tkinter/__init__.py", line 35, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named '_tkinter'
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment