Skip to content
Joey Wang
Menu

Search

Full Stack Development

Poetry vs uv: Choosing a Python Dependency Manager

Poetry and uv solve overlapping problems in Python dependency management; here is where each one wins, and how to use them together.

· 2 min read

engineering #python#productivity#ci

Audio summary

Two tools cover most Python dependency workflows today: Poetry and uv. They overlap just enough to be confusing about which one to reach for, so here’s the actual split.


What is Poetry?

Poetry is an all-in-one tool for dependency management and packaging. It uses pyproject.toml to define and manage your project’s dependencies, metadata, and build instructions. It simplifies creating and publishing Python packages.

# Create a new project with Poetry
poetry new my_project
cd my_project

# Add a dependency
poetry add requests

# Install dependencies
poetry install

What is uv?

uv is a next-generation Python package manager built by the creators of Ruff. It focuses on speed, determinism, and compatibility with pyproject.toml. While it doesn’t yet offer full package publishing, it’s blazing fast for installs and dependency resolution.

# Create a virtual environment with uv
uv venv
source .venv/bin/activate  # or .venv\Scripts\activate on Windows

# Install dependencies from pyproject.toml
uv pip install -r requirements.txt

# or use Poetry lockfile directly
uv pip install -r poetry.lock

Poetry vs. uv: Feature Comparison

Featureuvpoetry
Dependency resolutionUltra-fastSlower
Lockfile supportYes (poetry.lock)Yes
Virtualenv managementYes (uv venv)Yes (automatic)
Packaging and publishingNo (planned)Yes
CLI simplicityMinimalRich and descriptive
Editable installsYes (--editable)Yes
Cross-platform supportYesYes

Pros and Cons

Poetry

Pros:

  • Full packaging and publishing support
  • Clear CLI for managing dependencies
  • Automatically handles virtual environments

Cons:

  • Slower installs and resolution
  • Can be heavyweight
  • Complex projects may hit edge cases

uv

Pros:

  • Incredibly fast installs and resolution
  • Compatible with existing pyproject.toml and poetry.lock
  • Lightweight and simple to use

Cons:

  • No publishing features yet
  • Not ideal as a standalone tool for new projects
  • Requires a separate tool (like Poetry or PDM) to define dependencies

Putting them together

Keep pyproject.toml as the single source of truth and avoid requirements.txt outside of CI builds that specifically need it. Use Poetry (poetry add, poetry build) to define dependencies and publish packages, since that’s the piece uv doesn’t do yet. Swap poetry install for uv pip install -r poetry.lock in CI, where install speed actually matters. Commit the lockfile either way, and don’t mix in pip or conda on top, since the whole point is one source of truth for versions.

Conclusion

Use Poetry when you need full project management: packaging, publishing, the works. Use uv when speed matters and you’re not publishing anything, which is most of CI. The two aren’t competitors so much as a division of labor: Poetry to define, uv to install fast.