Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is there no tkinter distribution found?

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:

collecting tkinter

Could not find a version that satisfies the requirement tkinter (from versions:) No matching distribution found for tkinter

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

like image 493
Hissaan Ali Avatar asked Oct 08 '16 04:10

Hissaan Ali


People also ask

Why does it say no module named tkinter?

The Python "ModuleNotFoundError: No module named 'tkinter'" occurs when tkinter is not installed in our Python environment. To solve the error, install the module and import is as import tkinter as tk .

Why tkinter is not working in Python?

The easiest way to fix this problem is by upgrading your python to use python 3. If upgrading python is not an option, you only need to rename your imports to use Tkinter (uppercase) instead of tkinter (lowercase). Output: As a result, this window proves that your python installation includes the Tkinter module.

Is tkinter already installed in Python?

Tkinter comes pre-installed with the Python installer binaries for Mac OS X and the Windows platform. So if you install Python from the official binaries for Mac OS X or Windows platform, you are good to go with Tkinter. For Debian versions of Linux you have to install it manually by using the following commands.

Can I pip install tkinter?

Tkinter can be installed using pip. The following command is run in the command prompt to install Tkinter. This command will start downloading and installing packages related to the Tkinter library.


2 Answers

You should install

apt-get install python-tk 

This should solve your issue

like image 138
Senthil Kumar Vaithiyanathan Avatar answered Sep 27 '22 16:09

Senthil Kumar Vaithiyanathan


The Tkinter library comes in default with every Python installation

Try this:

import Tkinter as tk 
like image 24
Prabhakar Avatar answered Sep 27 '22 17:09

Prabhakar