0

I am trying to use Tkinter in Python on my Mac. However, I am getting this error:

'''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 suppress this warning.'''

I would silence this problem, if this didn't give me problems and errors. For example, this code should give me a white canvas:

import tkinter as tk

root = tk.Tk()
root.geometry('500x500')
root.title('Test Editor')

root.config(bg='white')
root.mainloop()

However, I am getting a black one instead (the geometry and title are the one I have chosen. This is happening with any colour I choose.

I updated my MacOS version to 13.4 (Ventura). This has led to the Python version also updating to 3.11.4 (I had 3.9.6 previously). Also I downloaded Python 3.11.4 from python.org and it includes an interactive session in it. I tried to reproduce the same code there (I work in VS Code) and the code worked successfully

  • Are you asking a question? Everything you wrote is a known problem, and using a version of python from python.org is the recommended solution. – Bryan Oakley Jun 13 '23 at 22:36
  • I have an answer [here](https://stackoverflow.com/a/73186351/8512262) that might help. But @BryanOakley is right, these are known issues which stem from using the Apple system Python which is outdated and shouldn't be used for Python development. – JRiggles Jun 13 '23 at 22:59

0 Answers0