Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
The below code logs me out of my Mac. Once I logged in again, the Anaconda navigator is not visible, but the process is running in the background. I have to run a 'killall python' command in terminal before starting anaconda navigator again.
I tried running in Spyder and also in the Python terminal. The same issue exists.
from tkinter import Tk
root = Tk()
Title = root.title("sample")
root.mainloop()
Not sure what I am missing here. Help me to understand this strange issue.
–
–
–
–
Pythonw solved my issue.
We need to change the PATH_TO_INTERPRETER for the one where pythonw is in our OS.
eg. In spyder, Preferences---> Python Interpreter -> Choose 'use the following Python interpreter' radio button and choose the path to pythonw
Changing interpreter to pythonw solved my "running python with tkinter root.mainloop() and logging me out of macOS" problem
(10.14.6 macOS)
Python 3
tkinter
root.mainloop()
This issues is due to update in macOS (10.14.6).
Tk.Tk() is working fine in macOs (10.14.5).
most certainly it is a macOS bug, but I don't think they will bother to fix this when they are so close to their 10.15 release.
In any python interpreter, when running tk.Tk() it makes macOS crash and logout giving the following error:
$ CGSTrackingRegionSetIsEnabled returned CG error 268435459
$ HIToolbox: received notification of WindowServer event port death.
But, still I am trying to identify any workaround for this issue.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.