Every time I renew my PC, I always find out how to put anaconda on my Mac, so I write it down. Even if it's not development work, it's convenient to put it in.
Follow the steps below to install.
Clone pyenv from github. The first time you use git, you may be prompted to install command line tools.
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
Put it through the path of pyenv.
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zprofile
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zprofile
$ echo 'eval "$(pyenv init -)"' >> ~/.zprofile
Now that you can use pyenv, restart the terminal.
Check the installable anaconda with the following command.
$ pyenv install --list | grep anaconda
Install anaconda with the following command.
$pyenv install The version of anaconda you want to include
It should be used all the time, so set it globally.
$pyenv global Same as the version entered in ↑
that's all
Recommended Posts