Pyenv

How to install and configure Pyenv. This is a WIP.

Install pyenv:

brew update
brew install pyenv

Configure pyenv:

echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(pyenv init -)"' >> ~/.zshrc

Install build deps of MacOS: brew install openssl readline sqlite3 xz zlib tcl-tk

List available versions: pyenv install -l

Install a version: pyenv install version

Set a global version to use: pyenv global version

There are three ways to set the python version to be used:

  • Select just for current shell session: pyenv shell version
  • Automatically select whenever you are in the current directory (or its subdirectories): pyenv local version
  • Select globally for your user account: pyenv global version
Last modified February 27, 2023: Changing taxonomies (f013483)