Tkinter not importing properly
Answered
Hello,
I have
from tkinter import *
in multiple files in my project, but PyCharm is underlining it, saying that it is Unresolved reference. My code runs just fine after pressing Shift+F10, including the tkinter part. The only way I can get rid of the underline is by importing:
from Lib.tkinter import *
But my code does not work the same way if I do that. For some reason IDE does not see tkinter module in the toplevel. I have installed future pacage, but it did not help.
I am using PyCharm 2018.2.3 Professional Edition on Windows 10, having installed Python 3.7
Please sign in to leave a comment.
Hi Horovtom,
Sorry for a late reply.
I cannot reproduce it on my side. Have you tried to do import of tkinter first?
Please provide a code sample if possible and a screenshot of your Project Interpreter window (Settings | Project | Project Interpreter).