Install pyenv with brew
$ brew install pyenv
Pass through PATH. vim ~/.bash_profile Add the following to
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
Reflect source ~/.bash_profile
echo $PATH Confirm with
install python
$ pyenv install 3.6.1
BUILD FAILED (OS X 10.12.5 using python-build 20160602) hogehoge~~ zipimport.ZipImportError: can't decompress data; zlib not available make: *** [install] Error 1
If the installation fails as described above, install zlib and install again.
$ xcode-select --install
Install it again and you're done!
Switching ver
$ pyenv global 3.6.1
Confirmation of ver
$ python --version
Recommended Posts