Sam Brown Sam Brown - 10 months ago 35
Python Question

How to create a window on Python 2?

I've been researching and I can't find anything. I tried this code:

import sys
from tkinter import *
App = Tk()

But I get back:

Traceback (most recent call last):
File "I:/Files/Documents/Python/Creating a", line 2, in <module>
from tkinter import *
ImportError: No module named tkinter


If you already installed tkinter, try below code.


In Python2:

from Tkinter import *  

In Python3:

from tkinter import *