Base tools¶
pyenv¶
pyenv is a version manager for Python.
It allows to install multiple versions of Python on the same machine.
Combined with pyenv-virtualenv plugin, it is also able to manage virtualenvs.
Install a python version¶
Activate a Python version¶
Create a virtualenv¶
Activate a virtualenv¶
Auto-activate a virtualenv¶
You can configure auto-activation of dev virtualenv when entering the current directory by using the following command:
This will create a .python-version file in your directory with the name of the specified virtualenv.
pyenv-virtualenv shell extension will automatically enable the virtualenv
when entering the directory.
Tip
Installed Python versions and virtualenvs are located in ${PYENV_ROOT}/versions
pipx¶
pipx is an application manager for Python. It creates a dedicated virtualenv for each application and adds it to your PATH.
Install a Python application¶
Tip
Each application is installed in a dedicated virtualenv located in ${HOME}/.local/pipx/venvs