brew install pyenv
- Add this to your
~/.zshrc
:
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/shims:$PATH"
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
fi
pyenv install 3.10.6
pyenv global 3.10.6
- Verify with
pyenv versions
pip install virtualenv
brew install pyenv-virtualenv
- Add this to your
~/.zshrc
:eval "$(pyenv virtualenv-init -)"
- close and open terminal