Environment
- macOS (Apple Silicon / arm64)
- Python 3.12 via Homebrew
uv for dependency management
Steps to Reproduce
- Clone the repo on a fresh macOS setup
- Run
make dev
Error
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File ".../pyclashbot/__main__.py", line 32, in <module>
from pyclashbot.bot.worker import WorkerProcess
...
File "/opt/homebrew/Cellar/python@3.12/3.12.8/Frameworks/Python.framework/Versions/3.12/lib/python3.12/tkinter/__init__.py", line 38, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named '_tkinter'
Root Cause
Homebrew's python@3.12 bottle is not compiled with Tcl/Tk support by default. The _tkinter C extension is distributed separately via the python-tk@3.12 formula.
Fix
brew install python-tk@3.12
After installing, make dev works correctly.
Suggestion
Consider adding a note to the README or CLAUDE.md macOS setup instructions:
brew install python-tk@3.12 # required for tkinter (GUI)
Environment
uvfor dependency managementSteps to Reproduce
make devError
Root Cause
Homebrew's
python@3.12bottle is not compiled with Tcl/Tk support by default. The_tkinterC extension is distributed separately via thepython-tk@3.12formula.Fix
After installing,
make devworks correctly.Suggestion
Consider adding a note to the README or CLAUDE.md macOS setup instructions:
brew install python-tk@3.12 # required for tkinter (GUI)