This story was originally published on HackerNoon at:
https://hackernoon.com/how-to-fix-zsh-command-not-found-python.
This can happen on any system but does occur slightly more commonly on macOS since they removed native python support in macOS 12.3.
Check more stories related to data-science at:
https://hackernoon.com/c/data-science.
You can also check exclusive content about
#python-programming,
#python,
#python-tutorials,
#programming,
#debug,
#python-tips,
#python-developers,
#python3,
#hackernoon-es, and more.
This story was written by:
@smpnjn. Learn more about this writer by checking
@smpnjn's about page,
and for more stories, please visit
hackernoon.com.
MacOS has removed native python support in MacOS 12.3.3. The issue is easy to fix. Make sure Python is installed and add python to zsh so that it will run upon typing the `python` command. If you are still facing issues, ensure that `python=$` where the $ sign should equal the path `Python` is installed on. If you still face the same issue, move to step 2. Add python to your zsh profile to run `/usr/bin/python3` when `python is run.