Install homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install pyenv
brew update
brew install pyenv
Add the following to ~/.zprofile
If you don't have a .zprofile touch ~/.zprofile
Add the following to you ~/.zprofile
eval "$(pyenv init --path)"
Add the following to your ~/.zshrc
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
Install a Python version
pyenv install 3.9.9
Set the global version
pyenv global 3.9.9
Source the profile for good measure
source ~/.zshrc
Check Python version
python -V
Python version should now be 3.9.9
which python
That should return something like `your/home/.pyenv/shims/python
Thanks for this Brandon. I think I generally got it working too. Although, I had to do a rosetta install of python 3.9.9 with pyenv to get it to compile. But I think this might be because my homebrew is rosetta from the early days of M1. I'll give it a try on the laptop which has none of that confusion in it.