Skip to content

Instantly share code, notes, and snippets.

@richstokes
Last active January 24, 2021 20:58
Show Gist options
  • Save richstokes/e2e989e20da699ab71410a99f87df4d0 to your computer and use it in GitHub Desktop.
Save richstokes/e2e989e20da699ab71410a99f87df4d0 to your computer and use it in GitHub Desktop.
pyenv install latest Python version
#!/bin/bash
brew update
brew install pyenv || brew upgrade pyenv
pyenv install $(pyenv install --list | grep -v - | grep -v b | grep -v a | tail -1)
pyenv versions
eval "$(pyenv init -)"
echo "Set latest globally with e.g.: pyenv global 3.8.2"
echo "Switch to version in local dir with e.g.: pyenv local 3.7.9"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment