Error: tkinter for Python Installation

0 votes

So, I am trying to import Tkinter. However, I keep getting this error stating that Tkinter has not been installed.

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


Can anybody help out?

Jul 3, 2019 in Linux Administration by Shubham
• 13,450 points
168 views

1 answer to this question.

0 votes
It isn't easy to install Tkinter locally to use with system-provided Python. You may build it from sources, but this is usually not the best idea with a binary package-based distribution you're apparently running.

There's always a safer option to apt-get install python-tk on your machine. And it works for most  Debian-derived distributions such as Ubuntu.
answered Jul 3, 2019 by Upasana
• 8,620 points

Related Questions In Linux Administration

0 votes
1 answer

Argument receiving error for rm command

Bash actually expands the asterisk to every ...READ MORE

answered Jun 7, 2019 in Linux Administration by Shubham
• 13,450 points
125 views
0 votes
2 answers

Job for httpd.service failed because the control process exited with error code.

Hi guys I was facing same problem as ...READ MORE

answered Nov 21 in Linux Administration by anonymous
• 140 points
2,530 views
0 votes
1 answer

Error: Failed to download metadata for repo 'epel-modular'

Hi@akhtar, Before running dnf repolist command, try to ...READ MORE

answered Jun 22 in Linux Administration by MD
• 79,930 points
1,276 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 1,567 views
0 votes
0 answers
+4 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,800 points
1,188 views
0 votes
1 answer

Which is a good hex editor for Linux?

You could try Bless. It is written ...READ MORE

answered Jun 4, 2019 in Linux Administration by Upasana
• 8,620 points
123 views
0 votes
1 answer

Cannot understand this "No X11 DISPLAY variable" error thrown at me

If you're on the main display, then export ...READ MORE

answered Jun 4, 2019 in Linux Administration by Upasana
• 8,620 points
4,263 views