title: How can I fix the "zsh: command not found: python" error? (macOS Monterey 12.3, Python&nbsp;3.10, Atom IDE, and atom-python-run 0.9.7)
body: <p>Since I got the <a href="https://en.wikipedia.org/wiki/MacOS_Monterey" rel="noreferrer">macOS v12.3</a> (Monterey) update (not sure it's related though), I have been getting this error when I try to run my Python code in the terminal:</p>
  <p><img src="https://i.stack.imgur.com/DJho7.png" alt="Python not found error" /></p>
  <p>I am using Python 3.10.3, <a href="https://en.wikipedia.org/wiki/Atom_(text_editor)" rel="noreferrer">Atom</a> IDE, and run the code in the terminal via atom-python-run package (which used to work perfectly fine). The settings for the package go like this:</p>
  <p><img src="https://i.stack.imgur.com/DT98c.jpg" alt="atom-python-run-settings" /></p>
  <p>The <code>which</code> command in the terminal returns the following (which is odd, because earlier it would return something to just <code>which python</code>):</p>
  <p><img src="https://i.stack.imgur.com/kSd1s.png" alt="Which Python" /></p>
  <p>I gather the error occurs because the terminal calls for <code>python</code> instead of <code>python3</code>, but I am super new to any coding and have no idea why it started now and how to fix it. Nothing of these has worked for me:</p>
  <ul>
  <li>I deleted and then reinstalled the Python interpreter from python.org.</li>
  <li>I tried <code>alias python='python3'</code> (which I saw in one of the threads here).</li>
  <li>I tried <code>export PATH=&quot;/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin&quot;</code> (which I found <a href="https://osxdaily.com/2018/05/24/command-not-found-mac-terminal-error-fix/" rel="noreferrer">here</a>).</li>
  <li>To reset zsh and paths, I deleted all associated hidden files in <code>/local/users/</code> and ran the terminal once again.</li>
  <li>I deleted everything and reinstalled Mac OS X and the Python interpreter only to get the same error.</li>
  </ul>