When trying to run python from terminal, it is possible to run into the following issue:
zsh: command not found: python
Enter fullscreen ...
For further actions, you may consider blocking this person and/or reporting abuse
I'm on an M1 Mac, the following worked for me as Step 2 (May 2023)
echo 'export PATH="$(brew --prefix)/opt/python@3/libexec/bin:$PATH"' >> ~/.zshrc
Found that at 'How do I use brew installed Python as the default Python?' on Stackoverflow.
Thanks, this is super helpful
Thanks
thanks @smpnjn
This error occurs because the system-provided Python 2 installation has been removed from Apple's macOS as of macOS 11 Big Sur.
When Apple removed the system-provided Python 2 installation, it impacted users who were relying on it for their Python development environment. As a result, they may have encountered the error message zsh: command not found: python when trying to run the python command.
To resolve this issue, you need to install a newer version of Python (such as Python 3 ) or use a version manager like Homebrew or pyenv to manage your Python installations. These tools allow you to install multiple versions of Python and switch between them as needed.
@smpnjn You can also add this post in your reference list that can be beneficial fo user who want to understand the concept of brew command not found error.
this path work for me
/usr/local/bin/python3
Thanks
Thank you for your help
THANK YOU SO MUCH
Thanks