PyenvNovember 30, 2024Reference https://github.com/pyenv/pyenvInstall zsh code snippet startbrew install pyenv pyenv-virtualenvzsh code snippet endInstall latest version (latest version of python 3)zsh code snippet startpyenv install $(pyenv latest -k 3)zsh code snippet endAdd env to .zshrc zsh code snippet startecho 'export PYENV_ROOT="$HOME/.pyenv" [[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init -)" eval "$(pyenv virtualenv-init -)"' >> ~/.zshrczsh code snippet endCreate new virtualenv using latest version (installed using pyenv install from above)zsh code snippet startpyenv virtualenv $(pyenv latest -k 3) an-arbitrary-namezsh code snippet endList all virtualenvs (active virtualenv will have a * prefix)zsh code snippet startpyenv virtualenvszsh code snippet end