Python version management looks trivial until you move to a new laptop, join a team that supports Windows, or inherit a repository pinned to an interpreter you do not have. At that point the choice between pyenv and uv stops being a matter of taste. The two tools solve overlapping but different problems, and the difference shows up in install time, environment handling, and how much of your workflow they take over.

This guide treats the comparison as a decision rather than a command dump. You will see how each tool obtains an interpreter, whether either one removes the need for a virtual environment, how their version files interact, and which one fits a new project, an existing pyenv workstation, and a CI image.

Table of Contents

  • The core difference: one job or a whole workflow
  • How each tool gets Python onto your machine
  • Virtual environments: do you still need a venv step?
  • Windows and mixed-OS teams
  • .python-version files and running both tools
  • Three common situations
  • Migration checklist
  • Conclusion

The core difference: one job or a whole workflow

pyenv is a version switcher. It is written as shell scripts, deliberately small, and it changes one thing: which interpreter python, pip, and the other shims resolve to. It does not depend on Python itself, and it leaves virtual environments alone, a gap its README acknowledges by pointing readers to plugins. You can read how pyenv's shims and version selection work in its documentation.

uv is an integrated package, project, and Python manager. It downloads interpreters, creates environments, resolves dependencies, writes a lockfile, and runs commands inside the resulting environment. Another way to frame the split is that pyenv changes which interpreter your commands hit and then steps back, while uv folds interpreter management into a single tool that also owns environments and dependencies, an argument pydevtools' comparison of the two tools for interpreter management develops at length.

That scope difference drives every practical trade-off below. Choosing pyenv means assembling a toolkit from parts you already understand. Choosing uv means adopting an opinionated workflow that covers more ground, including the parts pyenv leaves to you.

How each tool gets Python onto your machine

pyenv compiles most versions from source

pyenv install 3.12.4 downloads a source release and builds it on your machine, which is why the README tells you to install Python build dependencies first. On a fast desktop the build might take a couple of minutes; on a fresh container without a compiler, zlib, or OpenSSL headers, it fails early, usually at the configure step. The upside is control: you can pass options to CPython's configure step and compiler flags to customize the build, and pyenv covers a long list of distributions including Stackless Python and Jython.

uv downloads prebuilt standalone builds

uv python install 3.12 fetches the latest 3.12 patch as a prebuilt binary and finishes in seconds. uv calls these managed installations and treats everything else, including interpreters installed by pyenv, as system installations, a distinction uv's documentation on managed and system Python versions explains in detail. No compiler or development headers are involved, because the builds come from the python-build-standalone project. uv's own docs note that building from source requires preinstalled system dependencies and that producing optimized builds with PGO and LTO is very slow, which is exactly the work you skip.

There are limits. The downloadable versions are frozen for each uv release, so a freshly published CPython patch may require upgrading uv before uv python install can see it. Implementation coverage also differs: uv handles CPython, PyPy, GraalPy, and Pyodide, but its PyPy builds currently stop at Python 3.11, and it cannot reproduce a custom source build. Upgrades are smoother than pyenv's model for patch releases: uv python upgrade 3.12 moves a managed minor version to its latest patch, and virtual environments built from it follow along because the minor-version directory is a symlink to the patch directory, unless an environment was created with an exact patch pin such as 3.10.8.

What the failure modes look like

Failure pyenv uv
Missing compiler or headers Build stops with a configure error Not needed for downloads
Install time Minutes per version Seconds
Custom compile flags or patches Supported Not supported
Brand-new CPython patch Available once build definitions know it May need a newer uv release
No network access Needs a source tarball Needs a prebuilt archive or an existing interpreter

The table explains why the two tools feel different on a fresh machine. pyenv's common failure is environmental: the build toolchain is incomplete. uv's common failure is availability: the version or variant you want is not in this uv release, or you need a build that nobody publishes.

Virtual environments: do you still need a venv step?

Yes, both tools still rely on virtual environments. What changes is who creates one and when.

The mechanics are worth stating because they explain the migration cost later. A virtual environment is created on top of an existing installation, its pyvenv.cfg records that base interpreter, and it gets its own site-packages. Activation merely puts the environment's bin directory at the front of PATH. Environments are disposable and explicitly not movable, since the scripts inside them embed absolute interpreter paths, as Python's venv documentation describes.

The interpreter a new environment binds to is simply the one that ran the command, so choosing the version is a matter of invoking the right python binary. If that chain is not obvious on your machine, this walkthrough of creating a virtual environment with a specific Python version covers what python -m venv actually does with the interpreter it is given, including the pyvenv.cfg details.

pyenv leaves environments to you

pyenv does not create environments. The usual pattern is to pin the interpreter with pyenv local 3.12.4, then run python -m venv .venv and activate it. For those who want more automation, the pyenv-virtualenv plugin creates environments under pyenv's versions directory, can auto-activate them on directory entry, and prefers virtualenv when it is available, falling back to python -m venv when it is not. Either way, the venv step is a separate decision you make per project.

uv creates the environment for you

uv venv --python 3.11 creates a standard .venv and will download Python 3.11 if it is missing, as uv's guide to using Python environments explains. In a project, you rarely run that command directly: uv sync and uv run create the environment and the lockfile on first use, and keep them in sync afterwards, according to the uv projects guide. Unlike pip, uv refuses to install into an environment that is not a virtual environment unless you pass --system.

The important nuance is that uv automates the venv, not the concept. You still get a .venv per project, still activate it when you want a bare python, and still delete and recreate it when dependencies change drastically. What you stop doing is remembering to create it before the first install.

When plain venv is still the right choice

If a repository supports one Python version, your machine already has it, and you are not shipping to Windows, adding a version manager is overhead. python -m venv .venv plus a requirements file is easy to explain and works with every editor and CI system. The calculus changes when you need two interpreters on one machine, when contributors use different operating systems, or when "works on my machine" keeps tracing back to a system Python upgrade. That is when pinning and automatic downloads earn their keep.

Windows and mixed-OS teams

Windows is the clearest dividing line. pyenv does not officially support Windows and does not work outside the Windows Subsystem for Linux; even inside WSL it installs Linux builds, not native Windows ones, and its README recommends the separate pyenv-win fork for native use. uv runs natively on Windows, macOS, and Linux, and registers its managed Pythons in the Windows registry following PEP 514, so they show up through the py launcher.

For a team standardizing on one setup, that means uv can be documented once. A pyenv team either excludes Windows contributors from the default instructions or maintains a second, subtly different guide for pyenv-win.

.python-version files and running both tools

The .python-version file is the closest thing to a shared standard, and it makes migration cheaper than it looks. pyenv local 3.12.4 writes one, and uv reads it from the working directory and its parents, up to a project or workspace boundary, plus a user-level file. uv python pin 3.12 writes the same file, and uv python pin --global writes the user-level one.

Three differences matter when you mix the tools:

  • One version versus several. pyenv allows multiple versions in a .python-version file, one per line, so tox-style testing can select several at once. uv expects a single version request there and uses a separate .python-versions file when a project needs more than one.
  • Format for interoperability. uv accepts ranges and implementation names but recommends a plain version number for compatibility with other tools, which is also the format pyenv understands best.
  • Ownership. A Python installed by pyenv is a system Python to uv. If no uv-managed interpreter matches, uv uses the pyenv one rather than downloading a duplicate, but it will not manage or upgrade it. Passing --no-managed-python makes that expectation explicit, while uv python list --only-installed shows what uv can see.

One behavioral trap: uv python install puts versioned executables such as python3.12 in ~/.local/bin, but it will not take over the bare python command without the experimental --default flag. Scripts that assume python means the pinned version should run through uv run or an activated environment instead.

Three common situations

Situation Better default Why
New project, contributors on macOS, Linux, and Windows uv Identical commands everywhere, no compiler needed, lockfile included
Existing pyenv workstation where builds succeed Keep pyenv, add uv per project if useful Nothing to migrate; uv treats those interpreters as system Pythons
CI job or slim container image uv Prebuilt interpreters avoid a build toolchain, and uv sync reproduces the lockfile
Custom compile flags, Stackless, or another exotic build pyenv uv only offers published builds
One app, one Python version, no switching Plain python -m venv No extra tool to install or explain
Windows without WSL uv, or pyenv-win if the workflow is required pyenv itself does not support native Windows

The pattern behind the table is simple: uv wins when the cost of compiling and coordinating tools is high, and pyenv wins when you need control over the build itself. The single-project case is a reminder that both are optional.

Migration checklist

If you are moving a pyenv workstation to uv, do it in an order that keeps projects runnable:

  1. Inventory interpreters and pins. Run pyenv versions and check every repository's .python-version. Note any file with multiple lines, since uv will not treat it as a multi-version request.
  2. Normalize the pin. Reduce each project to the one version it actually tests against, then let uv python pin <version> rewrite the file in the plain-number format both tools read.
  3. Install matching interpreters. Run uv python install in each project, or leave the pyenv builds in place and let uv discover them as system Pythons. Prefer one approach per machine so you can predict which binary gets used.
  4. Recreate environments, do not move them. Delete the old .venv and run uv sync. A venv points at the absolute path of the interpreter that created it, so switching tools without rebuilding leaves a stale binding.
  5. Remove shell integration last. Delete the PYENV_ROOT export, the eval "$(pyenv init -)" line, and the shims entry from PATH, then restart the shell. Keep ~/.pyenv until every project has been rebuilt, because existing environments still reference it.
  6. Update CI and containers. Replace pyenv build steps with uv python install plus uv sync, or let uv download what the project pins. Use --system only where installing into a non-virtual environment is intentional.
  7. Decide how python behaves. If you depend on a bare python resolving to the pinned version outside uv run, keep a global default or use uv python install --default knowingly, since the flag is still experimental.

For a mixed setup, the boundary is not strict: uv-created environments are ordinary virtual environments, so pyenv and plain python -m venv keep working alongside them, and the shared .python-version file is what keeps the arrangement from becoming guesswork.

Conclusion

pyenv and uv answer the same opening question, "which Python should this project use?", but they stop at different points. pyenv gives you a reliable switcher built from shell scripts and source builds, then hands environment management back to you and plugins. uv gives you prebuilt interpreters, automatic environments, and a lockfile in one binary, and it is the only one of the two that treats Windows as a first-class platform.

For a new machine or a cross-platform team in 2026, uv is the lower-friction default. For an existing pyenv setup that works, or a project that needs a custom or unusual Python build, there is little reason to move. In between, run both: keep pyenv for the interpreters you have already built, let uv manage projects that want a lockfile and an automatic .venv, and keep every pin in a .python-version file so the next migration stays a matter of reinstalling, not rewriting.