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
After installing the correct version, close all terminals and try pyenv global 3.7.2 then try python --version, it should work