ann
ann

Reputation: 1

Install tkinter after installation of python3.9

I have installed Linux (aarch64) on a Raspberry Pi 4B and have both Python 3.7 and Python 3.9 installed. However, I am encountering an issue with a GUI visualization when running Python 3.9, specifically with the tkinter module.

The error message I receive is as follows: import tkinter as tk File "/usr/local/lib/python3.9/tkinter/__init__.py", line 37, in <module> import _tkinter # If this fails your Python may not be configured for Tk ModuleNotFoundError: No module named '_tkinter'

I have attempted to resolve the issue by installing the tkinter module using the command "python3.9 -m pip install tk". Unfortunately, the module is still not recognized. I would like to find a solution without having to reinstall Python. Reinstalling Python may potentially corrupt something, and I want to avoid any unintended consequences.

Any assistance in resolving this issue would be greatly appreciated.

Upvotes: 0

Views: 553

Answers (0)

Related Questions