Check installation
# check python installation
which python
# check python version
python -V # capital V
Install using pyenv
# Install pyenv
curl https://pyenv.run | bash
# Update pyenv
pyenv update
# view which python versions exist in local
pyenv versions
# list available versions for installation
pyenv install -l
# install specified version
pyenv install 3.11.11
# set python version using pyenv
pyenv global 3.11.11
# check python version
python --version
Plain Installation (not recommended)
# Homebrew
brew install python
## In `.zshrc`, connect PATH
export PATH="$(brew --prefix)/opt/python@3.11/libexec/bin:$PATH"
# check python version
python --version
# command using specific version
python3