Reputation: 38
I'll preface this by saying that I am aware that on 2.7 it should be:
import Tkinter
However, for whatever reason on my desktop running xenial and
python --version
returning:
python 2.7.12
I have had no trouble throughout the development of an application on my system importing tkinter with
import tkinter
I am wholly confused because as I went to work on a different machine I attempted to run my code only to find out I should have been using
import Tkinter
Which executes fine on the second machine. However,
import tkinter
returns that there is no module named tkinter.
Does anybody know why this is happening?
Upvotes: 1
Views: 62
Reputation: 13729
You must have installed the six
module at some point. It includes a dummy tkinter
that allows python3 style tkinter imports in python2.
Upvotes: 1