python -V
shows that I am on 2.7.7 but brew upgrade python
shows I have 2.7.8 so clearly my terminal isn't looking at the Homebrew version. How do I fix this?
MacOS – Moving terminal version of python to homebrew version
command linemacospython
Related Question
- Macports: switching back to the system default version of Python
- Using python 3 when the default is python 2.7
- How to install Python on macOS Catalina using homebrew
- MacOS – What are ways of installing Python 3
- Install python3 from Homebrew vs the installer from https://www.python.org/
- MacOS 11 Pyenv Python 3.9.0 Install Error
Best Answer
Check if
/usr/local/bin
is in your PATH and that it's before/usr/bin
. In the terminal:I believe
brew doctor
will warn you about this if it's not. Basically, if it's not, the system will look in/usr/bin
first instead of/usr/local/bin
, which is where homebrew links everything.For bash, you just need to add:
to your
~/.bash_profile
file.