Package Management

Libraries for package and dependency management.

uv manages your project with a lockfile, and doubles as a Python package manager. Its uv-build backend packages pure-Python code with reasonable defaults.

How to choose:

  • A new project, from installing Python to locking dependencies: uv
  • Packaging pure-Python code in a uv project: uv-build
  • Installing packages with only what ships with Python: pip
  • A project already on Poetry, or one that relies on its plugins: Poetry
  • Tests across a matrix of Python versions: Hatch
  • Command-line apps, each in its own environment: pipx, or uv tool on uv
  • Scientific stacks with non-Python libraries: conda
  • C or C++ extension modules: setuptools
  • Build hooks, or a layout uv-build doesn't expect: Hatchling
  • Building a Poetry project without Poetry installed: poetry-core

Listed in editorial order, grouped by use case. Click a column to re-sort the whole list.

Press / to search. Tap a tag to filter. Click any row for details.

Search and filter

Results

Row number Tags

Package Managers 6 projects

The package installer for Python.
pypa/github.com/pypa/pip / /421,287,705 downloads/month
An extremely fast Python version, package and project manager, written in Rust.
astral-sh/github.com/astral-sh/uv / /132,491,249 downloads/month
Python dependency management and packaging made easy.
python-poetry/github.com/python-poetry/poetry / /42,178,496 downloads/month
Modern, extensible Python project manager for environments, builds, and publishing.
pypa/github.com/pypa/hatch / /7,289,903 downloads/month
Install and Run Python Applications in Isolated Environments. Like npx in Node.js.
pypa/github.com/pypa/pipx / /3,729,708 downloads/month
Cross-platform, Python-agnostic binary package manager.

Build Backends 4 projects

The historical and still most widely used pyproject build backend.
pypa/github.com/pypa/setuptools / /965,962,543 downloads/month
Modern, extensible build backend from the hatch project.
pypa/github.com/pypa/hatch / /333,214,216 downloads/month
Poetry's PEP 517 build backend, usable without Poetry itself.
python-poetry/github.com/python-poetry/poetry-core / /88,653,390 downloads/month
uv's fast, minimal build backend for pure-Python projects.
astral-sh/github.com/astral-sh/uv / /16,815,419 downloads/month

Package Management guide

uv is a single tool for Python versions, virtual environments, dependencies, and command-line tools. Start a project with uv init, add packages with uv add, and run code with uv run, which checks that the lockfile and environment are up to date before every run. The uv pip commands are for projects not ready to move away from pip, not the main interface.

uv-build is uv's own build backend, and uv init sets it up with your code in src/<project_name>/. When you need build scripts or a more flexible layout, uv's docs suggest Hatchling instead.

pip installs packages from PyPI and other indexes. It comes with Python, but managing environments, the interpreter, and the project as a whole is outside its scope. Run it as python -m pip, so you know which Python gets the package.

Poetry manages your dependencies and builds your package, with a lockfile for repeatable installs. For a project you won't publish, turn off package mode and use Poetry for dependencies only. Its build backend, poetry-core, lets pip build and install your project without Poetry.

Hatch manages environments, builds, and Python installs for your project. hatch run test:pytest runs pytest in a test environment without activating it, and creates that environment on first use. A matrix repeats an environment across Python versions.

Hatchling is Hatch's build backend, developed with Hatch but separate from it. It takes the files to ship from your .gitignore and builds reproducible wheels and sdists by default.

pipx installs command-line apps each in its own virtual environment, so their dependencies never collide, and puts their commands on your PATH. To try an app once, pipx run runs it in a temporary environment. uv tool does the same job on uv, and pipx's docs say running both is fine.

conda manages packages and environments for any language, and its packages can hold system libraries and programs, not only Python modules. Keep your requirements in a file, and use pip only after conda has installed everything it can.

setuptools builds C and C++ extension modules, and Hatch's docs recommend it for them. Keep its configuration in pyproject.toml and setup.py minimal, if you need one at all, and don't run setup.py as a script.

Whichever tool writes your lockfile, commit it to version control, as uv and Poetry both recommend, so every machine installs the same versions.

Know a project that belongs here?

Tell us what it does and why it stands out.