rafaelmaeuer
3/29/2022 - 12:24 PM

How to reinstall python2 (python@2) from Homebrew?

# You can use pyenv to install python with:
brew install pyenv
pyenv install 2.7.18

# Optionally set it to your global default:
pyenv global 2.7.18

# Create Alias in .zshrc
alias python=/Users/<user>/.pyenv/versions/2.7.18/bin/python

# Reload shell and test
source .zshrc
python -V