After a day of headache, this worked for me:

$ brew install python-tk
Answer from subtleseeker on Stack Overflow
🌐
Tcl Wiki
wiki.tcl-lang.org › page › How+To+Update+Tkinter+on++Mac+OS+10.4
How To Update Tkinter on Mac OS 10.4
Tkinter is the interface between Python and the Tk framework. Just because you may have upgraded your Tcl/Tk frameworks doesn't mean you will be able to use your new version of Tk in Python immediately. In this tutorial we are going to upgrade Tcl and Tk from 8.4.7 to 8.5.11. The benefits are more widgets available to your applications. Version 8.5.12 is the latest version that will build on Mac ...
Discussions

python - Updating tcl/tk version of Homebrew python3 on macOS - Stack Overflow
My environment: macOS 10.13 python 3.7.1 from Homebrew I'm having lots of Tcl/TK quirks on the stock Tcl/TK 8.5 under /System/Library/Frameworks/Tcl.framework/Versions/8.5/, and would like to upgra... More on stackoverflow.com
🌐 stackoverflow.com
How do I run the version of tkinter I brew installed instead of the system version?
tkinter is a standard library included with Python on macOS and Windows, so shouldn't need to be installed using homebrew - it does need to be installed for a lot of linux distributions though as the Python installation is often slimmed down. However, the macOS system installation of Python (no longer the out-of-support Python 2.7) has a buggy Apple-supplied Tcl/Tk 8.5 installation. This is what is imported with the -m switch. See https://www.python.org/download/mac/tcltk/ I prefer to install my own versions of Python using PyEnv (so I can have multiple versions available for testing). I also always use Python virtual environments on a project-by-project basis and don't install in any of the base environments provided by pyenv. When you create a script using import tkinter as tk, and attempt to run it with Python, what error message do you get? I suspect none as that will use a different version of the Tcl/Tk library. More on reddit.com
🌐 r/learnpython
7
1
September 2, 2022
How to update tcl-tk? - Apple Community
I was able to update Python on my Mac to 2.7.17, without doing any harm, using Viking's suggestion. Thanks to tcl-tk, I have a nice brief GUI file editor where I can correct a stored program that from within my homemade language interpreter, everything good again! This is all it takes: from Tkinter ... More on discussions.apple.com
🌐 discussions.apple.com
Tkinter for python 3.10 broken on MacOS?

Python versions above 3.6 are messed up for Mac afaik, at least you need some fix with the new Mac chip, you have to have the package run it via Rosetta or something? (I can't quite remember it's been months since I set up 3.9) so it could also be that

Newer versions of python always a bit less stable, so maybe try 3.9 or something

More on reddit.com
🌐 r/Python
44
978
October 7, 2021
🌐
Python GUIs
pythonguis.com › installation › install tkinter on macos
How to Install Tkinter on macOS — Python GUI Setup Guide
3 weeks ago - Learn how to install Tkinter on macOS using Homebrew. This step-by-step guide walks you through installing Python 3 and Tkinter so you can start building Python GUI applications on your Mac.
🌐
Python
python.org › download › mac › tcltk
IDLE and tkinter with Tcl/Tk on macOS | Python.org
This release is included in macOS ... of macOS 10.6.x. Because of this, we strongly recommend that you do not attempt to use Tkinter or IDLE with the Apple-supplied Python 2.6.1 in 10.6. Instead, install a newer version of Python that supports a newer version of Tk. This is an Aqua Cocoa Tk. ... While Tcl and Tk are separate frameworks and libraries, they are closely related and are normally installed or updated ...
🌐
Reddit
reddit.com › r/learnpython › how do i run the version of tkinter i brew installed instead of the system version?
r/learnpython on Reddit: How do I run the version of tkinter I brew installed instead of the system version?
September 2, 2022 -

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

🌐
GeeksforGeeks
geeksforgeeks.org › how-to-install-tkinter-on-macos
How to Install Tkinter on MacOS? - GeeksforGeeks
September 22, 2021 - Follow the below steps to install the Tkinter package on macOS using pip:
🌐
GitHub
github.com › orgs › Homebrew › discussions › 646
Wrong version of tkinter · Homebrew · Discussion #646
If you need to have tcl-tk first in your PATH run: echo 'export PATH="/usr/local/opt/tcl-tk/bin:$PATH"' >> /Users/saul/.bash_profile For compilers to find tcl-tk you may need to set: export LDFLAGS="-L/usr/local/opt/tcl-tk/lib" export CPPFLAGS="-I/usr/local/opt/tcl-tk/include" For pkg-config to find tcl-tk you may need to set: export PKG_CONFIG_PATH="/usr/local/opt/tcl-tk/lib/pkgconfig" ==> Analytics install: 362,394 (30 days), 390,184 (90 days), 474,512 (365 days) install-on-request: 9,609 (30 days), 17,845 (90 days), 60,715 (365 days) build-error: 0 (30 days) I put the suggested lines in my bash_profile but they don't seem to have had any effect. >>> import tkinter >>> tcl = tkinter.Tcl() >>> print(tcl.call("info", "patchlevel")) 8.5.9
Find elsewhere
🌐
Apple Community
discussions.apple.com › thread › 250803178
How to update tcl-tk? - Apple Community
These can be installed without stepping on Apple's Python distribution, but are referenced from /usr/local/bin, so you would have to preface your PATH environment statement with it. None of the Python versions shipped by any release of OS X or macOS ever upgraded their Tk/Tcl version support ...
🌐
YouTube
youtube.com › watch
How To Install Tkinter in Visual Studio Code (Mac) - YouTube
Let’s learn How To Install Tkinter in Visual Studio Code (VSCode). Tkinter is a way of creating graphical user interfaces (GUIs) in Python. GUIs allow us to ...
Published   June 26, 2022
🌐
TkDocs
tkdocs.com › tutorial › install.html
TkDocs Tutorial - Installing Tk
If you want to build Tkinter from Python source, there are four steps: install developer tools, install Tcl/Tk, build Python, and verify Tkinter. To install Apple's developer tools (compiler, etc.), open a Terminal and at the command line, run: ... Here, you have two good options: using the ...
🌐
Reddit
reddit.com › r/python › tkinter for python 3.10 broken on macos?
r/Python on Reddit: Tkinter for python 3.10 broken on MacOS?
October 7, 2021 -

Hello, I read on the internet that there are some problems with Tkinter on laster MacOS updates like buttons invisible, UI bugs...Since I had some problems too recently, do you know anything about this situation?

EDIT : Solved! There is a package studied from Mac that extends tkinter and solves many problems. Take a look at my GitHub’s issue, there are all steps to solve the problem and install the package( tkmacosx) :

https://github.com/Saadmairaj/tkmacosx/issues/33

🌐
GeeksforGeeks
geeksforgeeks.org › how-to-uprgade-python-tkinter-to-latest-version
How to Uprgade Python Tkinter to Latest Version | GeeksforGeeks
March 6, 2024 - Once you have checked the current version of Tkinter, use the following command to upgrade Tkinter to the latest version: ... This command will fetch and install the latest version of Tkinter from the Python Package Index (PyPI). After the installation is complete, you can verify that Tkinter has been upgraded successfully by running the version check again. you should see the updated Tkinter version number printed to the console.
🌐
Medium
xogk39.medium.com › install-tkinter-on-mac-pyenv-f112bd3f4663
Install tkinter on Mac. (pyenv). Install tcl-tk | by Taeha Hong | Medium
May 8, 2020 - Install tkinter on Mac. (pyenv) Install tcl-tk ※ brew install tcl-tk ※ brew info tcl-tk tcl-tk: stable 8.6.10 (bottled) [keg-only] ... ==> Caveats tcl-tk is keg-only, which means it was not …
🌐
YouTube
youtube.com › watch
How To Get Started With Tkinter On A Mac | Learn Tkinter - YouTube
Let's talk about how to get started with Tkinter on a Mac. In this video you will learn how to get started with Tkinter in your Python codes. Tkinter allows ...
Published   December 15, 2021
🌐
Reddit
reddit.com › r/learnpython › tkinter issue on macos :(
r/learnpython on Reddit: Tkinter issue on macOS :(
November 14, 2024 -

Hello everyone,

I'm trying to tackle school coursework requiring me to use the Tkinter library. Initially, anything I would attempt to display would result in a black screen. After consulting with ChatGPT, and reinstalling python and tcl-tk via homebrew I now receive this error :

 ~ % python3 -m tkinter

   import _tkinter # If this fails your Python may not be configured for Tk

^^^^^^^^^^^^^^^

ModuleNotFoundError: No module named '_tkinter'

These are the versions of python I'm using :

~ % which python3

/opt/homebrew/bin/python3

~ % python3 --version

Python 3.13.0

brew install tcl-tk

Warning: tcl-tk 9.0.0_1 is already installed and up-to-date.

MAC OS : 15.0.1 (24A348)

If anyone has any suggestions on how I could solve this error please let me know.

🌐
Apple Community
discussions.apple.com › thread › 255231164
Python tkinter and Pysimple GUI elements … - Apple Community
October 26, 2023 - To reproduce this, install Python12, pip, tkinter etc. and provide below command on the terminal: ... 2023-10-26 00:10:29.063 Python[6583:49979] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES. ... I have the same problem running Python3.11.1 and MacOS 14.1.1.
🌐
PyPI
pypi.org › project › tkmacosx
tkmacosx · PyPI
This module provides some modified widgets of Tkinter which fixes many issues with widgets not working properly on macOS platform. For example Button of tkmacosx which looks and feels exactly like a native Tkinter button can change its background and foreground color and has a lot more functionality, Issues with Radiobutton are also fixed with this library. The library also offers some more useful functionality. Read more about all the classes and methods in the tkmacosx documentation. ... Similarly, for tag specify tag with @v0.x.x. For example to download tag v0.1.0 from Git use:
      » pip install tkmacosx
    
Published   May 27, 2022
Version   1.0.5