1

i have seen many such previously asked questions , and i have seen many pages explaining how to install this , but i see i am too beginner , so i dont know where to write this

sudo apt-get install python-tk

is this to be written in the python terminal that is python.exe , or in the cmd can somebody help me i am new to python but i know basics of programming in c++ and java if i write this in cmd - here i get this

C:\Users\shaurya>sudo apt-get install python-tk  'sudo' is not recognized as an internal or externalcommand ,operable program or batch file.

inside the python terminal - sudo apt-get install python-tkFile "<stdin>", line 1 sudo apt-get install python-tk syntax error ^

2 Answers2

0

Tkinter is inbuilt in Python

You should use pip for installing modules

You should use cmd to type in any pip commands

for example:-

  pip install "module_name"

enter the module name without the quotes

Praveen
  • 106
  • 1
  • 11
-2

Okay, so here's what you need to do. Use the control panel to uninstall your python and then install the latest version. Write this code in any IDE to verify your python and Tkinter installation:

from tkinter import *
print("Success!")

https://www.python.org/downloads/

Jean-François Fabre
  • 137,073
  • 23
  • 153
  • 219
thatguy_001
  • 74
  • 1
  • 8