Operations 6 min read

Why I Switched from pyenv/venv/pip to uv: 3‑Month Real‑World Review

After two years of struggling with pyenv, venv, and pip, the author adopted uv for three months and found dramatically faster installations, reliable dependency locking, and seamless cross‑platform team collaboration, prompting a decisive move away from the older tools.

Tech Ocean
Tech Ocean
Tech Ocean
Why I Switched from pyenv/venv/pip to uv: 3‑Month Real‑World Review

What Is uv?

uv combines Python version management, virtual environments, and package management into a single tool, replacing the need for separate utilities like pyenv, venv, and pip‑tools.

Speed Advantage

Installing large packages such as pandas, numpy, and aiohttp takes over two minutes with pip, while uv completes the same task in just a few seconds, making dependency resolution virtually instantaneous.

Real‑world case: A legacy Django project that required three minutes to install dependencies with pip finished in under 20 seconds using uv sync , with most of the time spent on network download rather than resolution.

Running uv lock generates a lock file that pins exact versions and hashes, ensuring that any teammate can reproduce the environment by executing uv sync without "it works on my machine" issues.

Installation

# macOS / Linux / WSL
curl -LsSf https://astral.sh/uv/install.sh | sh

# Windows
irm https://astral.sh/uv/install.ps1 | iex

Verify the installation with uv --version; restart the terminal if there is no output.

Core Commands

Python Version Management

uv python list          # list installable versions
uv python install 3.12
uv python pin 3.11      # pin the project to a specific version

Virtual Environments

uv venv                 # creates .venv by default
uv venv --python 3.11
# Activate (optional)
source .venv/bin/activate   # macOS/Linux
.venv\Scripts\activate      # Windows
# Or run directly without activation
uv run python main.py

Package Management

uv add requests fastapi          # add runtime dependencies
uv add --dev pytest black       # add development dependencies
uv sync                         # synchronize lock file
uv remove requests              # remove a package

Quick Project Bootstrap

uv init my-project
cd my-project
uv add pandas
uv run python main.py

Comparison with pip / pyenv / venv

Python version management: pip ❌, pyenv ✅, venv ❌, uv ✅

Virtual environment: pip ❌, pyenv ❌, venv ✅, uv ✅

Package installation: pip ✅, pyenv ❌, venv ❌, uv ✅

Dependency locking: pip ⚠️, pyenv ❌, venv ❌, uv ✅

Installation speed: pip slow, uv extremely fast

Tool count: pip 1, pyenv 1, venv 1, uv "1 over 4" (single tool covering four functions)

For projects still using requirements.txt, uv pip install -r requirements.txt works without compatibility issues.

Team Collaboration

Commit the uv.lock file to the repository. Teammates can run: uv sync && uv run python main.py This reproduces the exact environment on any OS, eliminating configuration differences.

FAQ

Will uv conflict with the system Python? No; uv uses an isolated directory.

Is it usable on Windows? Yes; the same commands work after PowerShell installation.

How to handle legacy projects? Install with the compatibility layer: uv pip install -r requirements.txt. To fully migrate, run uv init then add dependencies with uv add.

How to update uv itself?

uv self update

Conclusion

After years of dealing with fragmented Python environment tools, the author finds uv to be the single solution that finally resolves all pain points—once installed, the problems disappear.

Related Links

uv website: https://astral.sh/uv
GitHub: https://github.com/astral-sh/uv
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Performancetool comparisonenvironment managementPackage Managementuv
Tech Ocean
Written by

Tech Ocean

Focused on AI programming, sharing ready-to-use development efficiency solutions.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.