Tkinter import with PyCharm
<p>I want to create a tkinter window using pycharm:</p>

<pre><code>from tkinter import *

root = Tk()

root.mainloop()
</code></pre>

<p>Apparently PyCharm tells me that <code>from tkinter import *</code> is an unused import statement, and <code>root = Tk()</code> is an unresolved reference. What's confusing me is that the code works completely fine, a tkinter window shows up, no errors.</p>

<p>How do I fix this?</p>

<p><strong>Edit:</strong> PyCharm shows these error whenever I import any other library I have.</p>

<p>Try this </p>

<pre><code>from Tkinter import *
</code></pre>

python tkinter pycharm