- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to install Tkinter in Python?
Tkinter is a standard library in Python which is used for GUI application. Tkinter has various controls which are used to build a GUI-based application.
To install Tkinter, we need Python pre-installed. Tkinter actually comes along when we install Python. While installing Python, we need to check the td/tk and IDLE checkbox. This will install the tkinter and we need not install it separately.
However, if we missed installing Tkinter while installing Python, we can do it later using the pip command.
Step 1 − Make sure Python and pip is preinstalled on your system
Type the following commands in command propmt to check is python and pip is installed on your system.
To check Python
If python is successfully installed, the version of python installed on your system will be displayed.
To check pip
The version of pip will be displayed, if it is successfully installed on your system.
Step 2 − 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.
Kickstart Your Career
Get certified by completing the courseGet Started