I was practicing tkinter with PyCharm for my own project with serial and arduino. Nothing special about it - few buttons, option-menu and labels. But I clicked on Mac's menu bar in the tkinter's GUI window on the option "Show tab bar". And then macbook had a reboot. After it - every script with tkinter's GUI reboots my macbook on executing. A blank window is shown for a second and then mac reboots. I'm using Mojave 10.14.6 (18G84)
I deleted python 3.7 interpreter from mac and reinstalled PyCharm. I cleared cache folders for python and PyCharm.
import tkinter
tkinter._test() # and it crashes now ever in this code...
UPD: updated MacOS to 10.14.6 (18G87) - still the same issue
Have you tried to downgrade tkinter to a version below the one causing a crash?
I.e going from 8.6.8 to 8.6.7 in conda can be done by executing:
conda install tk 8.6.7
this is all it took to fix an identical issue and error log, might also work with pip
Seems to be a 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
I ran into this issue on Mojave 10.14.6 after installing python 3.7.4 and tkinter 8.6.8 using Miniconda3.
Downgrading to python 3.7.0 fixed this issue for me.
conda install python=3.7.0
I have the same issue with python 3.7.0, tk 8.6.8 in anaconda3 in macOS 10.14.6: once I start my tk interface script the OS logs out without an error message showed or error report filed. Windows are also lost.
My problem was solved once I update to macOS 10.15.3. Tk is working properly and haven't spotted a new issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With