Homebrew Python Not Found
This is a huge annoyance of mine. When you install Python using Homebrew, the install script doesn’t configure your PATH to accommodate the version-less symlinks and aliases created, resulting in the notorious error:
zsh: python: command not found zsh: pip: command not found
pip3 work but
pip will not!
How to fix ‘python command not found’
First create and copy the symlink location by running the following:
brew link python
That will return something like the following:
Note:I use an M1/M2 Mac. If you are using an Intel Mac, your path will start with
Copy the path that is returned, then open your
~/.bashrc if you use bash:
You can then add an
export PATH line at the top or bottom of your file with your appropriate Python version like so:
Save it and then open a new terminal, your
python command will now work as expected!