In this article, we will look into the various methods of installing Tkinter on a Windows machine.
Note: Python already comes bundled with Tkinter. But if you still face any error with Tkinter, follow along with the article for manual installation.
Prerequisite:
For PIP Users:
Open up the command prompt and use the below command to install Tkinter:
pip install tk
The following message will be displayed once the installation is completed:

To verify the installation use the tk._test() function. Use the below screenshots for reference:
Python3
import tkinter
tkinter._test()
|
Output:

For conda Users:
Conda users can open up the Anaconda Power Shell and use the below command to install Tkinter:
conda install -c anaconda tk
You will get the following message once the installation is completed:

To verify the installation run the below code:
Python3
import tkinter
tkinter._test()
|
Output:

Don't miss your chance to ride the wave of the data revolution! Every industry is scaling new heights by tapping into the power of data. Sharpen your skills and become a part of the hottest trend in the 21st century.
Dive into the future of technology - explore the Complete Machine Learning and Data Science Program by GeeksforGeeks and stay ahead of the curve.
Last Updated :
09 Sep, 2021
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...