I am trying to run this code in pycharm:
import tkinter as tk
root = tk.Tk()
w = tk.Label(root, text="Hello, world!")
w.pack()
root.mainloop()
However it always gives me the following errror:
Traceback (most recent call last):
File "/home/nils/PycharmProjects/rfid/first_test.py", line 1, in <module>
import tkinter as tk
ModuleNotFoundError: No module named 'tkinter'
If I use the same exact code in IDLE, it works perfectly. I just can not figure out how to install/import tkitner (through the project interpreter didnt work). I am using python 3.7 and the newest Linux Mint.
If you could provide me some hints or a solution, it would be very much appreciated :D
Thanks!
Edit: Typing in " import tkinter " in the IDLE shell works fine, however typing in the same in the PyCharm console produces the error above...
Edit2: I solved the problem by completly uninstalling pycharm and installing it again.