Created
September 10, 2021 02:25
-
-
Save msyvr/a5a9473f2def4e53ea8b0471046b9bdf to your computer and use it in GitHub Desktop.
This file contains 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
resource: https://opensource.com/article/19/5/python-3-default-mac | |
--- | |
essentials: | |
1. Install pyenv: | |
$ brew install pyenv | |
2. Install desired version of python: | |
$ pyenv install 3.9.0 | |
3. Set global default version | |
$ pyenv global 3.9.0 | |
4. Verify it worked | |
$ pyenv version | |
5. Give pyenv control over shell path (is z shell not bash, the filename at the end would be ~./zshrc): | |
$ echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bash_profile | |
--- | |
from resource above: "Now we know for certain that we're using Python 3.7.3 and pip will update alongside it without any manual aliasing between versions. Using Moshe's recommendation to use a version manager (pyenv) enables us to easily accept future upgrades without getting confused about which Python we are running at a given time." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment