On Raspbian, Buster, (Pi HW 4B) built and installed Pyton 3.11.1 Following tkinter docs (https://docs.python.org/3/library/tkinter.html) on first line of python program wrote:
from tkinter import *
received the following error: ModuleNotFoundError: No module name '_tkinter'
Following on numerous posts did the following using command line stmts:
pi@TBlank-Raspberry2:\~ $** python3 -V
Python 3.11.1
pi@TBlank-Raspberry2:\~ $** sudo apt-get install python3-tk
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-tk is already the newest version (3.7.3-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@TBlank-Raspberry2:\~ $** python3 -m tkinter
`Traceback (most recent call last):
File "<frozen runpy>", line 189, in _run_module_as_main
File "<frozen runpy>", line 148, in _get_module_details
File "<frozen runpy>", line 112, in _get_module_details
File "/usr/local/lib/python3.11/tkinter/__init__.py", line 38, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
^^^^^^^^^^^^^^^ ModuleNotFoundError: No module named '_tkinter'`
pi@TBlank-Raspberry2:\~ $
I've also found that using the python 3.10.9 compiler throws the same error.
All suggestions greatly appreciated. (hope first post wasn't too weak)