Skip to content

Instantly share code, notes, and snippets.

@maxali
Created November 9, 2023 18:37
Show Gist options
  • Save maxali/aa24efaacddced0636316d04051ef757 to your computer and use it in GitHub Desktop.
Save maxali/aa24efaacddced0636316d04051ef757 to your computer and use it in GitHub Desktop.
Configure Python Environment in MacOS
brew install pyenv
# Any modern version python should do. I don't think Python 2 is required any more.
pyenv install 3.10.3
pyenv global 3.10.3
# Add pyenv to your PATH so that you can reference python (not python3)
echo "export PATH=\"\${HOME}/.pyenv/shims:\${PATH}\"" >> ~/.zshrc
source ~/.zshrc
# open a new terminal window and confirm your pyenv version is mapped to python
which python
python --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment