No module named tkinter

No module named tkinter : Remove this Importerror

GET FREE AMZAON AUDIOBOOKS

When you want to use the Tkinter GUI python module and you are getting the error like No module named Tkinter after running the program then its most probably that you have not properly installed Tkinter module in your system. In this entire tutorial, you will learn how to install and remove importerror no module named tkinter.

 

How to remove No module named Tkinter Error

Suppose you want to check whether Tkinter is installed or not. To do so open the command prompt or terminal and type the following lines of code in the prompt.

python
import tkinter
tkinter._test()

When you run the above code then you will get GUI with the version of the tkinter module like below.

Checking Installation of Tkinter
Checking Installation of Tkinter

If you are not getting you to have to install Tkinter on your system.

 

Remove No module named Tkinter Error on Windows

You can remove this error by installing python on windows. Tkinter already comes with python. Go to the Python Download and install it in windows. After installing if you run the above code then you will get the Tkinter module version.  You can also look into this post How to install python to install python step by step.

 

No module named Tkinter Error removal on Linux

To remove this error on Linux then you have to install it. Run the following commands to install in the Linux OS. But before that first upgrade your Linux distribution. Run the below command.

Debian based distros:

sudo apt-get update

RPM based distros:

sudo yum update

After that run the command below to install Tkinter.

Debian based distros:

sudo apt-get install python3-tk

RPM based distros:

sudo yum install python3-tkinter

After the installation, it will remove the error.

 

Remove No module named Tkinter Error on Mac

MacOs come with python installed. Therefore most probably Tkinter will be installed. If you check the Tkinter version and it’s showing the error then you have to install it manually. To install it go to the Python downloads page and select MacOs python package. After that install it. It will remove the error.

You can also remove the error by simply updating the Python. Just open your terminal and type the following command.

brew upgrade python3

It will remove the error.

Conclusion

Tkinter is a great GUI python package for building beautiful Desktop Applications. These are methods to remove the No module named tkinter import error. Hope these methods have solved your problem. Even the problem persists then you can contact us for more help.

Source :

Tkinter Installtion

Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for signup. A Confirmation Email has been sent to your Email Address.

Something went wrong.

 
Thank you For sharing.We appreciate your support. Don't Forget to LIKE and FOLLOW our SITE to keep UPDATED with Data Science Learner