๐ŸŒ
Python documentation
docs.python.org โ€บ 3 โ€บ library โ€บ tkinter.html
tkinter โ€” Python interface to Tcl/Tk
February 23, 2026 - Source code: Lib/tkinter/__init__.py The tkinter package (โ€œTk interfaceโ€) is the standard Python interface to the Tcl/Tk GUI toolkit. Both Tk and tkinter are available on most Unix platforms, inclu...
๐ŸŒ
TkDocs
tkdocs.com โ€บ tutorial โ€บ install.html
TkDocs Tutorial - Installing Tk
Start Python, and from its command prompt, enter these two commands: ... Sep/2025: This section of the tutorial has not yet been updated. On Windows, the easiest way to get Tcl/Tk onto your machine is to install the "ActiveTcl" distribution from ActiveState, which includes Tcl, Tk, plus a number ...
๐ŸŒ
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-in-windows
How to Install Tk in Windows? - GeeksforGeeks
July 23, 2025 - During installation, ensure the "Tcl/Tk and IDLE" option is selected. 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.
๐ŸŒ
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 - I tried to use commands like 'sudo apt-get install python3-tk' and 'pip install python3-tk' under the Python Console, but they don't work either, prompting me "invalid syntax" for the space between them.
Find elsewhere
๐ŸŒ
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
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
๐ŸŒ
Python GUIs
pythonguis.com โ€บ installation โ€บ install tkinter on macos
How to Install Tkinter on macOS โ€” Python GUI Setup Guide
1 month ago - Learn how to install Tkinter on macOS using Homebrew. This step-by-step guide walks you through installing Python 3 and Tkinter so you can start building Python GUI applications on your Mac.
๐ŸŒ
ActiveState
activestate.com โ€บ home โ€บ resources โ€บ quick read โ€บ how to install tkinter in windows
How To Install Tkinter In Windows - ActiveState
January 24, 2024 - Popular Python distributions like ActivePython and Anaconda both come with Tkinter. The simplest method to install Tkinter in a Windows environment is to download and install ActivePython 3.8 from here.
๐ŸŒ
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'โ€ฆ
๐ŸŒ
openSUSE Forums
forums.opensuse.org โ€บ english โ€บ applications
Installing tkInter Python Package - How To - Applications - openSUSE Forums
July 5, 2011 - Hi Iโ€™m trying to install tkinter GUI for Python on my machine. Iโ€™m working in the Command Line Shell environment exclusively and Iโ€™m trying to get the tkinter Modules installed. Iโ€™m not exactly sure how to go about doing this, whether it is through YaST or not, but when I search for ...
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ article โ€บ how-to-install-tkinter-in-python
How to install Tkinter in Python?
March 25, 2026 - This guide shows how to check if Tkinter is available and install it if needed.
๐ŸŒ
Python GUIs
pythonguis.com โ€บ installation โ€บ install tkinter on ubuntu linux
How to Install Tkinter on Ubuntu Linux โ€” Step-by-Step Guide
1 month ago - In Ubuntu, Tkinter isn't included in the default Python installation. You can install Tkinter either from the command line with the apt package manager or via the Software Center.
๐ŸŒ
Oreate AI
oreateai.com โ€บ blog โ€บ installing-tkinter-your-guide-to-getting-started-with-pythons-gui-toolkit โ€บ 9e7f11f072122cb3c016961cf3699eb4
Installing Tkinter: Your Guide to Getting Started With Python's GUI Toolkit - Oreate AI Blog
December 24, 2025 - This article provides detailed instructions for installing and verifying Tcl/Tk integration within various operating systems while introducing basic usage examples.
๐ŸŒ
Arch Linux Forums
bbs.archlinux.org โ€บ viewtopic.php
[SOLVED] Python tkinter not working / Newbie Corner / Arch Linux Forums
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: