Why tkinter distribution not found?

I have a problem installing tkinter. I have version 2.7.11. I entered pip install tkinter on dos, but it shows the following message:

collector tkinter

Could not find a version that meets the tkinter requirement (from versions :) No suitable distribution for tkinter was found

I have successfully installed the flask with the same procedure, but for tkinter this shows the problem. How can I get rid of this problem?

+28
source share
7 answers

Tkinter library comes by default with every Python installation

Try the following:

 import Tkinter as tk 
+11
source

You must install

 apt-get install python-tk 

This should solve your problem.

+23
source

I had to install python3-tk manually before it worked (via apt-get)

0
source

Follow this guide to install Tkinter. However, now, starting with Python version 3.1 and later, it is part of the standard Python distribution.

You can also install it with sudo apt-get install python3-tk-dbg if you are in virtualenv. (The same can be done for a typical installation, not just for virtualenv)

0
source

To find your launch package:

sudo yum python search | grep tk

mine was:

yum install python3-tkinter.x86_64

0
source

answer below for windows:

after installing Tk on your Windows computer, following the instructions given in the following link ( https://tkdocs.com/tutorial/install.html#installwin ), import tkinter as tk (for python3) or import Tkinter as tk (for python2) . For your information - "Tkinter" has been renamed to "tkinter" in python3. It worked well for me.

0
source

pip shown. Could not find a version that meets the python--tkinter (from the python--tkinter No matching distribution was found for python--tkinter You are using pip version 10.0.1 , however version 19.0.3 is available. You should consider updating using the python -m pip install --upgrade pip .

0
source

All Articles