shell
$ brew install pyenv
shell
shell
$ git clone https://github.com/pyenv/pyenv.git ~/.pyenv
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
$ echo 'eval "$(pyenv init --path)"' >> ~/.bashrc
shell
$ git clone https://github.com/pyenv-win/pyenv-win.git $HOME/.pyenv
$ echo 'export PYENV_ROOT=$HOME/.pyenv' >> ~/.bashrc
$ echo 'export PATH=$PYENV_ROOT/bin:$PATH' >> ~/.bashrc
$ echo -e 'if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init --path)"
fi' >> ~/.bashrc
shell
$ pyenv install 3.9.1
shell
$ pyenv global 3.9.1
shell
$ pyenv local 3.8.6
shell
$ pyenv versions
shell
$ pyenv uninstall 3.8.6
shell
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
$ echo 'eval "$(pyenv init --path)"' >> ~/.bashrc