You probably need to install it using something similar to the following:

  • For Ubuntu or other distros with Apt:

    sudo apt-get install python3-tk
    
  • For Fedora:

    sudo dnf install python3-tkinter
    

You can also mention a Python version number like this:

  • sudo apt-get install python3.7-tk
    
  • sudo dnf install python3-tkinter-3.6.6-1.fc28.x86_64
    

Finally, import tkinter (for Python 3) or Tkinter (for Python 2), or choose at runtime based on the version number of the Python interpreter (for compatibility with both):

import sys
if sys.version_info[0] == 3:
    import tkinter as tk
else:
    import Tkinter as tk
Answer from d-coder on Stack Overflow
Discussions

Bug: "ModuleNotFoundError: No module named '_tkinter" when importing PySimpleGUI
Type of Issue Bug While this seems to be similar to earlier bugs having to do with problems with Tk installations on Raspberry Pi, the fixes that previously worked are NOT currently sufficient to r... More on github.com
🌐 github.com
4
December 11, 2021
ModuleNotFoundError: No module named 'tkinter' in Ubuntu 20.04
To Reproduce Just after importing like import pywhatkit getting below error Traceback (most recent call last): File "/home/paul/.local/lib/python3.9/site-packages/mouseinfo/__init__.py", ... More on github.com
🌐 github.com
4
May 26, 2022
ModuleNotFoundError: No module named '_tkinter'
See https://tkdocs.com/tutorial/install.html Also, this is not related to Ubuntu. More on reddit.com
🌐 r/Ubuntu
3
1
February 4, 2025
python - Tkinter module not found on Ubuntu - Stack Overflow
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24) [GCC 4.5.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import Tkinter >>> on the othe... More on stackoverflow.com
🌐 stackoverflow.com
🌐
GeeksforGeeks
geeksforgeeks.org › python › how-to-fix-modulenotfounderror-no-module-named-tkinter
How to Fix: ModuleNotFoundError: No module named 'tkinter' - GeeksforGeeks
July 23, 2025 - In this article, we will explore ... it. The "ModuleNotFoundError: No module named 'tkinter'" error occurs when Python cannot find the Tkinter module, which is necessary for creating graphical user interfaces....
🌐
GitHub
github.com › PySimpleGUI › PySimpleGUI › issues › 5022
Bug: "ModuleNotFoundError: No module named '_tkinter" when importing PySimpleGUI · Issue #5022 · PySimpleGUI/PySimpleGUI
December 11, 2021 - /sonautics/sonascan_releases/sonascan_2021209r1/venv/bin/python /sonautics/sonascan_releases/sonascan_2021209r1/src/main.py Traceback (most recent call last): File "/sonautics/sonascan_releases/sonascan_2021209r1/src/main.py", line 118, in <module> import PySimpleGUI as sg File "/sonautics/sonascan_releases/sonascan_2021209r1/venv/lib/python3.10/site-packages/PySimpleGUI/__init__.py", line 3, in <module> from .PySimpleGUI import * File "/sonautics/sonascan_releases/sonascan_2021209r1/venv/lib/python3.10/site-packages/PySimpleGUI/PySimpleGUI.py", line 115, in <module> import tkinter as tk File "/usr/lib/python3.10/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' Process finished with exit code 1
Author   mcgregor94086
🌐
GitHub
github.com › Ankit404butfound › PyWhatKit › issues › 210
ModuleNotFoundError: No module named 'tkinter' in Ubuntu 20.04 · Issue #210 · Ankit404butfound/PyWhatKit
May 26, 2022 - Run the following: sudo apt-get install python3-tk python3-dev') SystemExit: NOTE: You must install tkinter on Linux to use MouseInfo.
Published   May 26, 2022
Author   rohan-paul
Find elsewhere
🌐
Python Forum
python-forum.io › thread-37886.html
[SOLVED] Tkinter module not found
Hello team, So I installed tkinter using pip3 install tkBut when I try to run the following code import tkinter as tk root = tk.Tk() root.mainloop()I get the following error: Traceback (most recent call last): File 'iwannadie.py', line 1, in &l...
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 360006480380-No-module-named-tkinter
No module named 'tkinter' – IDEs Support (IntelliJ Platform) | JetBrains
October 26, 2019 - Out of despair, I created a new environment using Anaconda3 (and python 3.7) and it worked, no tkinter problem anymore.
🌐
Bobby Hadz
bobbyhadz.com › blog › python-no-module-named-tkinter
ModuleNotFoundError: No module named 'tkinter' in Python | bobbyhadz
April 8, 2024 - The Python "ModuleNotFoundError: No module named 'tkinter'" occurs when tkinter is not installed in our Python environment.
🌐
Linux Mint Forums
forums.linuxmint.com › board index › main edition support › software & applications
[SOLVED] Need help installing tkinter into pycharm ... - Linux Mint Forums
October 14, 2022 - I could then successfully import tkinter in the Python Console. I then created a python file in the project and added the following lines: ... Ggeeezzzzz, finally got PyCharm to work. Problem was that I installed PyCharm Flatpak. I removed it and got another version and my scripts now work without changing anything.
🌐
sebhastian
sebhastian.com › python-no-module-named-tkinter
ImportError: No module named _tkinter, please install the python-tk package | sebhastian
January 31, 2023 - The error ImportError: No module named _tkinter occurred because the Tkinter package was not found on your computer system. Several Linux-based distributions separate the Tkinter package from the standard libraries included in Python, so you ...
🌐
Reddit
reddit.com › r/tkinter › modulenotfounderror: no module named 'tkinter' - cannot run tkinter in visual studio code
r/Tkinter on Reddit: ModuleNotFoundError: No module named 'tkinter' - Cannot run tkinter in Visual Studio Code
November 4, 2022 -

Hi everyone,

Im working in a project using Python and I ran into an issue regarding tkinter. The first time a execute the testing code:

from tkinter import *
from tkinter import ttk
root = Tk()
frm = ttk.Frame(root, padding=10)
frm.grid()
ttk.Label(frm, text="Hello World!").grid(column=0, row=0)
ttk.Button(frm, text="Quit", command=root.destroy).grid(column=1, row=0)
root.mainloop()

Gave me the following error --> ModuleNotFoundError: No module named 'tkinter'

Im using Fedora so I proceed installing tkinter using "sudo dnf install python3-tkinter" command. And when I run "python3 -m tkinter" from terminal it shows the pop-up window. But i keep ran in into the same error when I execute the code from VSC.

Anyone had an idea of how to solve this?

thank you all!

🌐
Python.org
discuss.python.org › python help
Pip install tkinter fails, python 3.8.7, redhat 10.2.1-9 - Python Help - Discussions on Python.org
June 8, 2022 - $ pip install tkinter --user ERROR: Could not find a version that satisfies the requirement tkinter (from versions: none) ERROR: No matching distribution found for tkinter $ python Python 3.8.7 (default, Dec 22 2020, 00…
🌐
Python.org
discuss.python.org › python help
importError: No module named tkinter - Python Help - Discussions on Python.org
October 8, 2019 - hello python.org, I have a problem import tkinter module which is summarized as a result. indeed I follow beginner in python, and I use the system linux mint and IDE atom for my project. in the terminal the import of python works marvel well the tcl and others. but the problem is that when ...
🌐
Reddit
reddit.com › r/learnpython › no module named ‘tkinter’
No module named 'tkinter' : r/learnpython
November 13, 2022 -

Hey guys

I am working in Visual Studio on a school assignment for my Computer Science class. It requires use of the turtle module. I am being told that it comes with python when you install it, however, when I try to use it, I am told that there is no module named ‘tkinter’. Could someone let me know what has to be done to fix this? Thanks

🌐
GitHub
github.com › matplotlib › matplotlib › issues › 9017
Getting "No module named '_tkinter'" error · Issue #9017 · matplotlib/matplotlib
August 10, 2017 - >>> import matplotlib.pyplot Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.6/site-packages/matplotlib/pyplot.py", line 115, in <module> _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup() File "/usr/local/lib/python3.6/site-packages/matplotlib/backends/__init__.py", line 32, in pylab_setup globals(),locals(),[backend_name],0) File "/usr/local/lib/python3.6/site-packages/matplotlib/backends/backend_tkagg.py", line 6, in <module> from six.moves import tkinter as Tk File "/usr/local/lib/python3.6/site-packages/six.py",
Author   SamusAranX