MacOS
Install Python in MacOS systems
To follow this guide, you will need to install Homebrew first.
After Homebrew is installed, let's install pyenv:
This command will show a list of Python versions:
Now let's install the latest Python version (3.8.5 as of this writing):
Now that Python 3 is installed through pyenv, we want to set it as our global default version for pyenv environments:
The power of pyenv comes from its control over our shell's path. In order for it to work correctly, we need to add the following to our configuration file (.zshrc or .bash_profile) depending on your terminal version:
Now create a new terminal session and run:
You should see the 3.8.5 version showing up.
Sources:
Last updated