I use pip install python-tk but have an error ERROR: Could not find a version that satisfies the requirement python-tk (from versions: none) ERROR: No matching distribution found for python-tk
Asked
Active
Viewed 3.2k times
3
-
1Which version of python are you using? – Daweo Oct 17 '21 at 11:21
-
2what OS, what python version? – buran Oct 17 '21 at 11:24
-
If you are on Linux you probably want to install tkinter using `sudo apt-get install python3-tk` or similar for your distro (you may need to search for the exact name of the package but it should be there) – Rolv Apneseth Oct 17 '21 at 11:31
-
3You can't install tkinter with pip – Bryan Oakley Oct 18 '21 at 15:37
3 Answers
-6
Firstly Make sure Python and pip is preinstalled on your system. Type the following commands in command prompt to check is python and pip is installed on your system.
To check Python:
python --version
If python is successfully installed, the version of python installed on your system will be displayed.
To check pip
pip -V
The version of pip will be displayed, if it is successfully installed on your system.
Now Install Tkinter
Tkinter can be installed using pip. The following command is run in the command prompt to install Tkinter.
pip install tk
This command will start downloading and installing packages related to the Tkinter library. Once done, the message of successful installation will be displayed.

user12256545
- 2,755
- 4
- 14
- 28
-
6The package `tk` is not tkinter, it's tensorkit. You can't install tkinter with pip. – Bryan Oakley Oct 18 '21 at 15:38
-
1