Member-only story
The Best Way We Create and Manage Multiple Versions of Python
A complete setup guide for pyenv

We have tried installing Python using the native environment, Docker containers, venv
, and pyenv
. We decided to use pyenv
and virtualenv.
I will tell you why pyenv
was best for some configurations in our environment.
pyenv is a tool for managing different versions of Python virtual.
I learned about pyenv
when one DevOps staff told me about it. We researched and tested several approaches for managing python versions for our non-cloud software products. We decided to use pyenv
.
pyenv
Version 2.7.1 was released at the beginning of December 2022 and is a continuously maintained Python tool. pyenv
has an extensible architecture, where a new plugin adds new functionality and is built entirely of Unix/Linux shell code.
For example, pyenv-virtualenv, a plugin for virtualenv
, the latest version is two months old.
We like this architecture decision as it allows mature plugin functionality to be loaded while problematic plugins are not loaded. Also, you can customize pyenv
with custom plugins that add particular functionality needed by your organization.