Manage Python versions
This project doesn't maintain multiple Python installations for you; you can use mise, pyenv, or asdf to do so.
% mise install python@3.7.9
% pyenv install 3.7.9
% asdf install python 3.7.9
Install a tool with a specific Python version
% mise shell python@3.7.9
% pipz install httpie
% pyenv shell 3.7.9
% pipz install httpie
% asdf shell python 3.7.9
% pipz install httpie
Create a venv with a specific Python version
% mise shell python@3.7.9
% envin # or: activate
% pyenv shell 3.7.9
% envin # or: activate
% asdf shell python 3.7.9
% envin # or: activate
Once the venv is created this way,
envin
and activate
will by default use that same Python version,
regardless of the current shell's path
.
Keep multiple Python version venvs available for a single project
% mise shell python@3.7.9
% envin --py current # or: activate --py current
% pyenv shell 3.7.9
% envin --py current # or: activate --py current
% asdf shell python 3.7.9
% envin --py current # or: activate --py current
Instead of the venv path being for example ~/.local/share/venvs/646…/venv
,
it will be ~/.local/share/venvs/646…/venv-python-3.7.9
.