I am running MacOS Big Sur (11.2.3).
With python2, I have Tkinter built-in.
With python3, it has to be installed manually and it's very simple, just run:
$ brew install python-tk
To run python2 in a terminal, execute python file.py.
To run python3 in a terminal, execute python3 file.py.
I am running MacOS Big Sur (11.2.3).
With python2, I have Tkinter built-in.
With python3, it has to be installed manually and it's very simple, just run:
$ brew install python-tk
To run python2 in a terminal, execute python file.py.
To run python3 in a terminal, execute python3 file.py.
Based on the comments from above and the fact that Python must be linked to Tcl/Tk framework:
If you don't have Xcode command line tools, install those:
xcode-select --install
If you don't have Tcl/Tk brew installation (check brew list), install that:
brew install tcl-tk
Then, run "brew uninstall python" if that was not installed with option --with-tcl-tk (the current official option). Then install Python again, linking it to the brew installed Tcl/Tk:
brew install python --with-tcl-tk
How do I run the version of tkinter I brew installed instead of the system version?
python - How to install tkinter on M1 Mac - Stack Overflow
python-tk@3.9: It's no longer possible to 'import tkinter' in a Python venv / virtualenv (but it works outside of virtualenv)
brew install python --with-brewed-tk fails to make _tkinter.so
Videos
On MacOS 12.5 I have updated to the latest version of Python and pip and I just brew installed tkinter. When I do "python3 -m tkinter", I get the message: DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release. - and the window that launches is buggy.
It seems like the command above is not running the version of tkinter I just installed with brew.
Why is that and how do I get rid of this deprecated system version?
Or in general what is the real issue here?
Thanks very much