Created
November 9, 2023 18:37
-
-
Save maxali/aa24efaacddced0636316d04051ef757 to your computer and use it in GitHub Desktop.
Configure Python Environment in MacOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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