The go-to resource for upgrading Python, Django, Flask, and your dependencies.

Python Version Management (asdf, mise, pyenv)


Like a python constricts its prey, it tightens its grip incrementally with each breath the prey releases, expending minimal energy while achieving maximum effect.

Similarly, when we manage Python versions across projects, we should apply a measured, incremental approach — installing only the version each project needs and switching without rebuilding the entire environment. This measured method ensures we conserve effort while maintaining flexibility.

Managing multiple Python versions is essential for developers working on diverse projects with varying requirements. Tools like pyenv, asdf, and mise simplify switching between versions without conflicts. This guide compares these popular Python version managers, helping you choose the best for your workflow.

Why Use a Python Version Manager?

Python projects often require specific versions (e.g., 3.8 for legacy, 3.12 for new features). System Python may conflict, and virtual environments alone aren’t enough. Version managers:

  • Install multiple Pythons side-by-side.
  • Switch globally, per-project, or per-shell.
  • Support shims for seamless python calls.
  • Handle dependencies automatically.

Keywords like “best Python version manager 2026” lead here for actionable advice.

pyenv: Python-Focused Simplicity

pyenv is the classic Python-only manager, forked from rbenv. It builds from source, supports plugins like pyenv-virtualenv.

Installation

# Linux/macOS (recommended)
curl https://pyenv.run | bash

# Add to ~/.bashrc or ~/.zshrc
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"

macOS: brew install pyenv

Restart shell, install deps (e.g., Ubuntu: sudo apt install build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev).

Usage

pyenv install 3.12.2  # List: pyenv install --list
pyenv global 3.12.2   # Or local/shell for project/shell
pyenv versions
python --version      # Uses shim

Pros: Mature, lightweight, per-project .python-version. Cons: Builds slow, Python-only.

asdf: Multi-Language Extensibility

asdf manages Node.js, Ruby, Elixir, etc., via plugins. Python via asdf-python plugin.

Installation

git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.1
echo '. $HOME/.asdf/asdf.sh' >> ~/.bashrc
echo '. $HOME/.asdf/completions/asdf.bash' >> ~/.bashrc

Python Setup & Usage

asdf plugin add python https://github.com/asdf-community/asdf-python.git
asdf install python 3.12.2
asdf global python 3.12.2
asdf reshim python  # After pip installs

Uses .tool-versions for projects.

Pros: One tool for all langs, plugin ecosystem. Cons: Builds from source (slow), less Python-specific.

mise: Modern, Fast Successor

mise (formerly rtx) is Rust-based, asdf-compatible, with precompiled binaries for speed. Supports tasks/envs.

Installation

curl https://mise.run | sh
echo 'eval "$(mise activate zsh)"' >> ~/.zshrc  # Or bash/fish

Usage

mise use python@3.12  # Installs & sets global
mise use --local python@3.11  # Project .mise.toml or .tool-versions
python --version

Precompiled Pythons (no build deps), uv integration for venvs.

Pros: Fast installs, multi-lang, tasks/envs, shims/activate. Cons: Newer, learning curve for extras.

Comparison: pyenv vs asdf vs mise

Featurepyenvasdfmise
LanguagesPython onlyMultiMulti
Install SpeedSlow (build)Slow (build)Fast (prebuilt)
Config File.python-version.tool-versions.tool-versions/.mise.toml
Shell IntegrationShimsShimsShims/Activate
ExtrasPluginsPluginsTasks/Envs/uv

pyenv vs asdf: pyenv for Python-only; asdf if multi-lang needed. asdf vs mise: mise faster, more features. Recommendation: mise for most (speed/multi), pyenv for simplicity.

Which to Choose in 2026?

  • Pure Python projects: pyenv.
  • Multi-lang monorepos: mise (fastest).
  • asdf users: Migrate to mise (compatible).

Test: mise doctor or pyenv doctor.

FAQ

pyenv vs mise? Mise faster/multi-lang. Best Python version manager? mise for speed. asdf deprecated? No, but mise recommended successor.

Start with curl https://mise.run | sh for modern workflows.

Sponsored by Durable Programming

Need help maintaining or upgrading your Python application? Durable Programming specializes in keeping Python apps secure, performant, and up-to-date.

Hire Durable Programming