AttributeError: 'module' object has no attribute 'Tk' [duplicate] AttributeError: 'module' object has no attribute 'Tk' [duplicate] tkinter tkinter

AttributeError: 'module' object has no attribute 'Tk' [duplicate]


The problem is that you named your file Tkinter.py. When you do the import, python sees the file and tries to import it instead of the Tkinter library.

Rename your file, and be sure to remove Tkinter.pyc if it exists.