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()
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