1

I have the following code:

import tkinter as tk

window = tk.Tk()

When I run python3 main.py it returns:

DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1 to s
uppress this warning.

From my understanding, tkinter comes installed with python, so there is no need to run python3 -m pip install tkinter (I have tried this anway) and it also doesn't show up in pip list for that reason. I am running Python 3.6.1 from within a virtual environment. Thanks for any help with this.

Justin
  • 339
  • 1
  • 3
  • 15

1 Answers1

-2

Have you tried pip install tk?

TheLizzard
  • 7,248
  • 2
  • 11
  • 31
  • Yes, but then I visited https://pypi.org/project/tk/ and it says it is TensorKit, which I don't think is related to tkinter? – Justin Mar 12 '21 at 22:41
  • @ManKitKwong To suggest something use the comments bellow the question. If you are sure about the solution to the problem, write an answer. – TheLizzard Mar 12 '21 at 22:43
  • I don't have enough reputation to comment on the original post.. Try pip install pytk..That might work help – NineDeadEyes Mar 12 '21 at 22:49
  • @NineDeadEyes From pypi's website: *PyTK - Python ToolKit: A thin Pythonic layer on top of TkInter GUI.* `pytk` isn't the same as `tkinter` – TheLizzard Mar 12 '21 at 22:51