Skip to main content
Last Updated: 2025-10-20 Applies to: v2.7.0+

Overview

This guide helps you migrate from pip-based dependency management to uv. The migration is backward compatible - both methods work, but uv is now the recommended approach.

Why Migrate?

Performance

  • 10-100x faster dependency resolution
  • 🚀 Parallel downloads and installations
  • 📦 Efficient caching with automatic deduplication

Reliability

  • 🔒 Reproducible builds via uv.lock lockfile
  • 🛡️ Better conflict resolution than pip
  • Deterministic dependency trees

Developer Experience

  • 🎯 Single command: uv sync replaces multiple pip commands
  • 🔧 Automatic venv management - no manual activation
  • 📝 Single source of truth - pyproject.toml only

Quick Migration

For Developers

Before (pip):
After (uv):

For CI/CD

Before (pip):
After (uv):

Detailed Migration Steps

Step 1: Install uv

Verify installation:

Step 2: Remove Old Virtual Environment (Optional)

Step 3: Install Dependencies with uv

What happens:
  1. ✅ Creates .venv if it doesn’t exist
  2. ✅ Reads pyproject.toml for dependencies
  3. ✅ Uses uv.lock for exact versions
  4. ✅ Installs everything in one fast operation

Step 4: Update Your Workflow

Replace old commands with new ones:

Step 5: Update Scripts & Makefiles

Before:
After:

Common Workflows

Development Workflow

Adding New Dependencies

Before (pip):
After (uv):

Updating Dependencies

Installing Optional Dependencies

CI/CD Migration

GitHub Actions

Before:
After:

Docker

Current approach (still works):
Future approach (optional):

Troubleshooting

Issue: “uv: command not found”

Solution:

Issue: Dependencies not found

Solution:

Issue: Version conflicts

Solution:

Issue: “No module named X” when running code

Solution:

Issue: CI/CD cache issues

Solution:

FAQ

Do I need to delete requirements.txt files?

No. They’re kept for backward compatibility and will be removed in a future release.

Can I still use pip?

Yes. You can still run pip install -e . if needed, but uv is recommended.

What about requirements-pinned.txt?

uv.lock replaces it. The lockfile provides the same guarantees with better performance.

How do I know which Python version to use?

Check .python-version file:

Can I use uv with existing venv?

Yes, but starting fresh is recommended:

Does uv work on Windows?

Yes. uv supports Windows, macOS, and Linux.

What if I need a specific version?

Edit pyproject.toml:
Then run:

Migration Checklist

  • Install uv (curl -LsSf https://astral.sh/uv/install.sh | sh)
  • Verify uv works (uv --version)
  • Run uv sync to install dependencies
  • Test your application (uv run python -m <your_module>)
  • Run tests (uv run pytest)
  • Update scripts/Makefiles to use uv
  • Update CI/CD workflows (if applicable)
  • Update documentation (if applicable)
  • Delete old .venv if you want a fresh start

Getting Help

Documentation

Issues

Community

Rollback Plan

If you need to revert to pip:

Benefits Recap

  • 10-100x faster dependency resolution
  • Reproducible builds with lockfile
  • Single command for everything
  • Automatic venv management
  • Better caching and performance
  • Modern Python packaging (PEP 621)
  • Works everywhere - Windows, macOS, Linux

Questions? Open an issue or check our discussions.