I'm fairly new to all of this and trying to self-teach. I only have really a vague understanding of concepts like virtual environments, shells, and kernels. I'm currently trying to generate a GUI with tkinter in Jupyter Notebooks. I was having trouble doing this in Pycharm until I changed to a different interpreter. I don't fully understand why this resolved the problem, but I believe it had something to do with using the proper version of python to interpret the script. Unfortunately, I need my python scripts to run in Jupyter, but I can't get the tkinter module to work when I run it in a notebook. I'm not sure how to change the interpreter or if that would even be what I need to do to fix the problem.
Here's the error:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-f463ac1a0eae> in <module>
1 #Creating GUI with tkinter
----> 2 from tkinter.constants import *
3
4
5 def send():
/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py in <module>
35 import types
36
---> 37 import _tkinter # If this fails your Python may not be configured for Tk
38 TclError = _tkinter.TclError
39 from tkinter.constants import *
ModuleNotFoundError: No module named '_tkinter'
Any help would be greatly appreciated!