I would like to use pyenv to switch python2 and python3.
I successfully downloaded python2 and python3 and pyenv with following codes.
brew install pyenv
You forgot to add this eval "$(pyenv init -)".
eval "$(pyenv init -)"
Add this to your .bash_profile or .bashrc file (mac <=10.14) or to your .zshrc file (mac 10.15+)