Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonjack/ebecdd72f9e0da967c7f0b5b9903ff50 to your computer and use it in GitHub Desktop.
Save jonjack/ebecdd72f9e0da967c7f0b5b9903ff50 to your computer and use it in GitHub Desktop.

Assumes you have brew installed.

Install pyenv.

brew install pyenv

Check what versions of python are available.

pyenv install --list

Install a version.

pyenv install 3.9.1

If you run into some error such as "xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun" then you may need to install xcode.

xcode-select --install

Once pyenv has installed python we can then use it to set our global version.

pyenv global 3.9.1

# and verify it worked
pyenv version

3.9.1 (set by /Users/jjack/.pyenv/version)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment