from tkinter import * from tkinter import messagebox root= Tk() root.mainloop()
Error:
...Traceback (most recent call last)
You named your file tkinter.py, so when you import tkinter, it's importing that file rather than the real tkinter module.
tkinter.py
tkinter
Rename your file to just about anything else.