Reference: Building an environment with pyenv and virtualenv
% pyenv install --list
$ pyenv install 3.5.0
$ pyenv install 2.7.10
% pyenv versions
system
2.7.10
* 3.5.0 (set by /Users/xxx/.pyenv/version)
% python --version
Python 3.5.0
If you set it to global, the specified version will be reflected in the whole, and if you set it to local, the specified version will be reflected in the current directory.
$ pyenv global 3.5.0
$ python --version
Python 3.5.0
$ pyenv local 2.7.10
$ python --version
Python 2.7.10
Recommended Posts