5

I was using tkinter on Mac. But when I used the following simple code, the computer will restart.

import tkinter as tk
window = tk.Tk()

What is the problem? Thank you!

  • Mac: Mojave, version 10.14.6
  • tkinter: version 8.6
  • python: 3.7.3
milanbalazs
  • 4,811
  • 4
  • 23
  • 45
Shark Deng
  • 960
  • 9
  • 26
  • @Shark Deng Seems to be like common problem https://www.python.org/download/mac/tcltk/#built-in-8-6-8 according to them >If you are using macOS 10.6 or later, the Apple-supplied Tcl/Tk 8.5 has serious bugs that can cause application crashes. You might want to reinstall python https://www.python.org/downloads/release/python-374/ – BPDESILVA Aug 15 '19 at 05:16

1 Answers1

1

Seems to be like common problem python.org/download/mac/tcltk/#built-in-8-6-8 according to them

If you are using macOS 10.6 or later, the Apple-supplied Tcl/Tk 8.5 has serious bugs that can cause application crashes.

Rather than fixing TCL/TK I recommend you to want to reinstall a python version that satisfies the requirement & use it python.org/downloads/release/python-374

BPDESILVA
  • 2,040
  • 5
  • 15
  • 35