With pyenv, multiple versions of python can coexist, which is very convenient.
brew install pyenv-virtualenv pyenv
~/.zshrc
# pyenv
export PYENV_ROOT="${HOME}/.pyenv"
export PATH=${PYENV_ROOT}/bin:$PATH
eval "$(pyenv init -)"
Reflected in ** source ~ / .zshrc **
Introduced pyenv-pip-rehash, an automation tool for pyenv rehash
git clone https://github.com/yyuu/pyenv-pip-rehash.git ~/.pyenv/plugins/pyenv-pip-rehash
#List of versions that can be installed
pyenv install -l
#I wanted to use anaconda, so I installed the latest version of anaconda
pyenv install anaconda3-4.0.0
#Check the installed version
pyenv versions
#switching
pyenv global anaconda3-4.0.0
#Command location
which python
/Users/yudsuzuk/.pyenv/shims/python
#Version confirmation
python --version
Python 3.5.1 :: Anaconda 4.0.0 (x86_64)
ipython notebook
I got it
Recommended Posts