Tkinter , 'module' object has no attribute 'Frame'
python, tk-toolkit, tkinter
Solution
You should use `Tkinter` (`tkinter` if you use Python 3.x), not `_tkinter`:
import Tkinter as tk
According to Tkinter module documentation:
... The Tk interface is located in a binary module named `_tkinter`. This module contains the low-level interface to Tk, and should never be used directly by application programmers.
Problem
i write a hello world app in tkinter python, but i recive next message: 'module' object has no attribute 'Frame' ``` import _tkinter as tk ``` here is the error ``` class Application(tk.Frame): def __init__(self, master=None): tk.Frame.__init__(self, master) self.pack() self.createWidgets() def createWidgets(self): self.hi_there = tk.Button(self) self.hi_there["text"] = "Hello World\n(click me)" self.hi_there["command"] = self.say_hi self.hi_there.pack(side="top") self.QUIT = tk.Button(self, text="QUIT", fg="red", command=root.destroy) self.QUIT.pack(side="bottom") def say_hi(self): print("hi there, everyone!") root = tk.Tk() app = Application(master=root) app.mainloop() ``` why this are happening?