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 OverflowTkinter 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
For Windows, check this checkbox during setup.

Videos
How do i install Tkinter i watched tutorials but it doesnt match mine python 3.10
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.
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
Try this:
sudo apt-get install python-tk
or, since your question is tagged as python3, this:
sudo apt-get install python3-tk
python-tk cannot be installed using pip.
As tk is TkInter (-> Interface to TK, which is written in C(++) ) you need to install the C(++) Library TK.
you cannot install this library using pip, as pip is designed to install (mainly)[1]pure python packages. By the way you would not have the sufficient rights to install the library. So you need to ask your superuser for help.
The only way to install it is using
sudo apt-get install python-tk # python2
or
sudo apt-get install python3-tk #python3
And last but not least you would have to use pip3 to install packages for python3.
It is the same as you cannot install freetype using pip.
Note: it is better to use python3 -m pip instead of pip3, as there might be multiple python3 installations on your machine (e.g. python3.4 and python3.5.1)
[1]: Actually pip is able to compile C/C++ Libraries, but it does not seem like it is able to install System-Libraries. Or one will create this package in future.