1, installHomebrew

Copy command line to terminal, Installation.
/usr/bin/ruby -e "$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/install/master/install)"
 

2, installpyenv
brew update
 
brew install pyenv
 

2.1 stay .bash_profile Add to file


 
export PYENV_ROOT=/usr/local/var/pyenv if which pyenv > /dev/null; then eval
"$(pyenv init -)"; fi
 

 2.2 Update input in terminal:
source .bash_profile
 

3, install3.X Editionpython
pyenv install 3.5.1
 

4, Update after installation
pyenv rehash
 

5, View installed versions
// Number indicates the version the system is currently using pyenv versions
 

6, switchpython Edition
pyenv global 3.5.1
 

7, confirmpython Edition
python