I am having a problem during the installation of tkinter. I have version 2.7.11. I entered the pip install tkinter
on dos but it shows the following message:
You should install
apt-get install python-tk
This should solve your issue
pip shown
Could not find a version that satisfies the requirement python--tkinter
(from versions: )
No matching distribution found for python--tkinter
You are using pip version 10.0.1
, however version 19.0.3
is available.
You should consider upgrading via the python -m pip install --upgrade pip
command.
to find your package run:
sudo yum search python|grep tk
mine was:
yum install python3-tkinter.x86_64
The Tkinter library comes in default with every Python installation
Try this:
import Tkinter as tk
I was able to fix this on Amazon Linux 2 with python2.7
by running this sudo yum install python-tools -y
command.
I had to install python3-tk manually before it worked (via apt-get)