Python#
Install and manage python versions using pyenv.
pyenv#
This process uses pyenv to manage Python installation and versions. pyenv is a Python version manager that can manage and install different versions of Python.
Add the following lines to update your ~/.zshrc
/ ~/.zprofile
files,
instructing them to use pyenv to manage Python:
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
Install additional dependencies required to build Python
pyenv install 3.12
pyenv install 3.11
pyenv install 3.10
pyenv install 3.9
pyenv install 3.8
pyenv global 3.11 3.12 3.10 3.9 3.8
pyenv rehash
IPython#
Install IPython
pipx#
Install pipx
pipx is a tool to help you install and run end-user applications written in Python. It's roughly similar to macOS's brew, JavaScript's npx, and Linux's apt.
It's closely related to pip. In fact, it uses pip, but is focused on installing and managing Python packages that can be run from the command line directly as applications.
Add the following lines to update your ~/.zshrc
file, instructing it to use
pyenv
's default Python version to bootstrap pipx
applications: