Tkinter Library is not recognized by Pycharm

-2

I'm importing the Tkinter library into PyCharm, but PyCharm is not recognizing its features, not running and displaying error.

I have attached the image of the error presented for help.

    
asked by anonymous 04.01.2019 / 18:18

1 answer

2

Your file is called tkinter.py .

When you do from tkinter import * , you will import all objects from your own file. In order of priority, the interpreter will search the module first in the project directory.

Since your file does not define the Tk class, the undefined class error is thrown.

To avoid these problems, avoid naming your files with Python module names.

    
04.01.2019 / 18:34