Tkinter isn't distributed through pip; if it didn't come pre-packaged with Python, you have to get it from elsewhere:

  • Ubuntu
sudo apt-get install python3-tk 
  • Fedora
sudo dnf install python3-tkinter
  • MacOS
brew install python-tk
Answer from Emile Durkheim on Stack Overflow
๐ŸŒ
Python documentation
docs.python.org โ€บ 3 โ€บ library โ€บ tkinter.html
tkinter โ€” Python interface to Tcl/Tk
February 23, 2026 - Running python -m tkinter from the command line should open a window demonstrating a simple Tk interface, letting you know that tkinter is properly installed on your system, and also showing what version of Tcl/Tk is installed, so you can read ...
๐ŸŒ
JetBrains
intellij-support.jetbrains.com โ€บ hc โ€บ en-us โ€บ community โ€บ posts โ€บ 360006691679-How-to-install-tkinter
How to install tkinter? โ€“ IDEs Support (IntelliJ Platform) | JetBrains
November 22, 2019 - Hi, I've been trying to install Tkinter onto IDEA under the Python Community Edition Plugins, but no matter what I do it just wouldn't work. I tried to use commands like 'sudo apt-get install python3-tk' and 'pip install python3-tk' under the ...
๐ŸŒ
TkDocs
tkdocs.com โ€บ tutorial โ€บ install.html
TkDocs Tutorial - Installing Tk
On many versions of Ubuntu for example, you need to install a package named python3-tk. To verify Tkinter is installed correctly, start Python, and from its command prompt, enter these two commands:
Find elsewhere
๐ŸŒ
Google
google.com โ€บ goto
[SOLVED] Python tkinter not working / Newbie Corner / Arch Linux Forums
March 26, 2017 - For future searchers, the reason for this is because the pip python package is called tk and not tkinter, so you must do: ... Github Account: github.com/babaliaris Arch General Guidelines Favourite Distro: archlinux.org Arch Wiki ... babaliaris' answer is completely wrong. In Arch, we do not manage python using pip. You simply install python and tk:
๐ŸŒ
PyPI
pypi.org โ€บ project โ€บ tkintertable
tkintertable
JavaScript is disabled in your browser. Please enable JavaScript to proceed ยท A required part of this site couldnโ€™t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser
๐ŸŒ
ZMT zurich med tech
forum.zmt.swiss โ€บ home โ€บ sim4life โ€บ python api โ€บ s4l v6.0 python pip install tkinter
S4L v6.0 python pip install tkinter | ZMT zurich med tech
May 12, 2022 - Unfortunately the Python version that is bundled with Sim4Life does not include tkinter and it is far from trivial to install it manually.
Top answer
1 of 5
16

If you installed python3.8 using apt (via ppa:deadsnakes/ppa), it can be installed using apt too, the name of library is python3.8-tk.

sudo apt install python3.8-tk

In my case, it solves the problem. For instance, now I can use matplotlib in python3.8 which requires tkinter.

2 of 5
6

Recompile and reinstall python3.8 specifying path to folders with tcl, tk includes and libraries.

sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev python-tk python3-tk tk-dev

cd ~/Downloads
wget https://www.python.org/ftp/python/3.8.2/Python-3.8.2.tgz
tar -xvf Python-3.8.2.tgz

cd Python-3.8.2

Edit ./configure file the next way: replace ... for next lines:

  --with-tcltk-includes='-I/usr/include'
  --with-tcltk-libs='-L/usr/lib'

./configure
make -j2    # replace 2 by number of processor cores you have
sudo make install

$ python3.8
Python 3.8.2 (default, May 11 2020, 14:30:03) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
>>> 

Python 3.8 installed through apt and pyenv on 16.04 does not include tkinter, as I think or there's a some bug that does not allow to import it. Only rebuilding helped. Previously I've used 20.04 with built in Python 3.8 version, which supports tkinter with only additional packages installing as it is for Python 3.5 on 16.04.

python3.8-tk installation as Ankur A Sharma said is also required. I've forget to mention it. But it is not sufficient for 16.04, at least in my case.

Additional requirement from OP's comment:

sudo ./configure --with-tcltk-includes='-I/usr/include -I/usr/include/tcl' --with-tcltk-libs='-L/usr/lib -ltcl -ltk' --enable-optimizations
๐ŸŒ
Instructables
instructables.com โ€บ design โ€บ software
Installing Python ,tkinter and Ttkbootstrap on Windows 10/11 Using PIP for GUI Development : 3 Steps - Instructables
January 23, 2026 - Installing Python ,tkinter and Ttkbootstrap on Windows 10/11 Using PIP for GUI Development: Here we will learn How to install Python,tkinter on Windows 10 /11 system, How to add Python interpreter to Windows path for command line use and How to install Python tkinter/ttkbootstrap GUI framework on Windows 10/11 using PIP installer Python'โ€ฆ
๐ŸŒ
Google
google.com โ€บ python โ€บ how-to-install-tkinter-in-windows
How to Install Tk in Windows? - GeeksforGeeks
July 23, 2025 - However, if you want to ensure all dependencies are managed via pip (though tkinter is part of the Python standard library in most cases), you can install the tk package using pip.
๐ŸŒ
Python GUIs
pythonguis.com โ€บ installation โ€บ install tkinter on ubuntu linux
How to Install Tkinter on Ubuntu Linux โ€” Step-by-Step Guide
2 weeks ago - Learn how to install Tkinter on Ubuntu Linux using apt. This step-by-step guide covers installing the python3-tk package so you can start building Python GUI applications with Tkinter.
๐ŸŒ
Python GUIs
pythonguis.com โ€บ installation โ€บ install tkinter on windows
How to Install Tkinter on Windows 10 & 11 (Step-by-Step Guide)
March 23, 2026 - Learn how to install Tkinter on Windows 10 & 11 for Python GUI development. Step-by-step guide to setting up Python with Tkinter so you can start building desktop applications.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ how-to-install-tkinter-on-macos
How to Install Tkinter on MacOS? - GeeksforGeeks
July 23, 2025 - Step 3: Upgrade your pip to avoid errors during installation. ... Step 4: Enter the following command to install Tkinter using pip3.
๐ŸŒ
Google
google.com โ€บ goto
Pip install tkinter python 3.10
Tkinter is a standard library included with most Python 3.10 installations and generally does not require a pip install. If you encounter issues, ensure your Python 3.10 installation includes Tcl/Tk support or install system-level Tkinter packages if on Linux.
๐ŸŒ
EndeavourOS
forum.endeavouros.com โ€บ general system โ€บ applications
Pip cannot install tkinter - Applications - EndeavourOS
August 3, 2023 - Hi, for my Python Projects I need the (custom)tkinter modules, which are available through pip. But after I installed python-pip-git from AUR, there always comes following error: error: externally-managed-environment ร— This environment is externally managed โ•ฐโ”€> To install Python packages system-wide, try 'pacman -S python-xyz', where xyz is the package you are trying to install.