title: ModuleNotFoundError: No module named '_tkinter' on macOS
body: <p>Tkinter doesn't work, it throws an error.</p>
  <h1>Installation</h1>
  <pre><code>% pip3 install tk
  </code></pre>
  <h1>My code</h1>
  <pre><code>#!/usr/bin/env python3
  
  import tkinter as tk
  </code></pre>
  <h1>The Error</h1>
  <pre><code>Traceback (most recent call last):
    File &quot;/Users/arghadip/Library/Application Support/CodeRunner/Unsaved/Untitled.py&quot;, line 4, in &lt;module&gt;
      import tkinter as tk
    File &quot;/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py&quot;, line 37, in &lt;module&gt;
      import _tkinter # If this fails your Python may not be configured for Tk
  ModuleNotFoundError: No module named '_tkinter'
  </code></pre>