[July 2021]
If you see this message when running eval "$(pyenv init -)"
WARNING: `pyenv init -` no longer sets PATH.
Run `pyenv init` to see the necessary changes to make to your configuration.
you should check the message from pyenv init as the warning says, but in a nutshell, you can use eval "$(pyenv init --path)" instead.
And don’t forget to accordingly update your ~/.bash_profile, ~/.zprofile, ~/.bashrc, ~/.zshrc or the like if necessary.