I'm using Ubuntu 18.04 lts. It keep saying me that tk is not defined . Is there a way to install tkinter in Ubuntu . Pls help me
Asked
Active
Viewed 281 times
-1
-
*It keep saying me that tk is not defined*.Please share the code that triggered this error by editing your question – Billal Begueradj May 15 '18 at 17:34
-
I see 75 questions on stackoverflow when I search for "install tkinter ubuntu". Did absolutely none of those help you? – Bryan Oakley May 15 '18 at 18:15
-
Have you taken a look at this SO? https://stackoverflow.com/questions/26702119/installing-tkinter-on-ubuntu-14-04 – rsiemens May 15 '18 at 23:36
-
@BryanOakley I'm able to get the output in python3 idle but not in pycharm – Midhun S May 16 '18 at 02:09
-
@BillalBEGUERADJ I'm able to get the output in python3 idle but not in pycharm. – Midhun S May 16 '18 at 02:10
1 Answers
0
Update your package list:
sudo apt-get update
Then depending on your version of Python run one of the following below:
Python 2
sudo apt-get install python-tk
Python 3
sudo apt-get install python3-tk

rsiemens
- 615
- 6
- 15
-
I'm using pycharm buy I'm not able to get the output . It still says error but I'm able to get the output in python3 idle – Midhun S May 16 '18 at 02:05