0 votes
1 view
in Python by (12.5k 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 (24.8k 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:

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...