So, I'm trying to use a project, that uses tkinter on my Raspberry Pi but I have an issue.
I needed an updated version of Python, so I updated it to 3.7.4, however, when I try to
import tkinter, it gives me the error message
ModuleNotFoundError: No module named '_tkinter'. Tkinter also gives the message
If this fails, your Python may not be configured for Tk. Other modules import as usual.
How can I configure Python to use Tk? Thank you, in advance, for any help.
python3 -m tkinter gives the same error message as trying to import it.
sudo apt-get install python-tk and
sudo apt-get install python3-tk but it says it's already the latest version and doesn't do anything.
I then uninstalled and reinstalled tkinter but that didn't help.
I updated Python by running these commands (I have wiped the system and done it again, but same issue):
cd ~ wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz tar -zxvf Python-3.7.4.tgz cd Python-3.7.4 ./configure make sudo make install