python - Labels not defined in tkinter app -
i'm trying make basic window text "t" inside using tkinter, when running code shell spits out "nameerror: name 'label' not defined". i'm running python 3.5.2. i followed tutorials problem in label = label(root, text="test") line. import tkinter root = tkinter.tk() sheight = root.winfo_screenheight() swidth = root.winfo_screenwidth() root.minsize(width=swidth, height=sheight) root.maxsize(width=swidth, height=sheight) label = label(root, text="test") label1.pack() root = mainloop() is label function different in 3.5.2? you never imported label class. try tkinter.label check import statements tutorials maybe imply from tkinter import *