Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
3 views
in Python by (19.9k points)

I am trying to install python on Linux and I am getting the following error:

ImportError: No module named _tkinter, please install the python-tk package.

How do I install tkinter on Linux?

1 Answer

0 votes
by (25.1k points)

You are getting this error because you have not installed tkinter locally. 

You can run the install command to download and install tkinter.

For Debian systems (like Ubuntu):

sudo apt-get install python3-tk

For Fedora you can use:

sudo dnf install python3-tkinter

If you wish to get an in-depth understanding about python in general you should check out this video:

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...