Now let's install the latest Python version (3.8.5 as of this writing):
pyenv install 3.8.5
Now that Python 3 is installed through pyenv, we want to set it as our global default version for pyenv environments:
$ pyenv global 3.8.5
# and verify it worked
$ pyenv version
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: