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 header to re-sort the whole list.

Press / to search. Tags open their category. Click a row for details.

Search and filter

Results

Row number Tags

Package Managers 6 projects

The package installer for Python.
pypa/github.com/pypa/pip /10,303 stars /
An extremely fast Python version, package and project manager, written in Rust.
astral-sh/github.com/astral-sh/uv /91,340 stars /
Python dependency management and packaging made easy.
Modern, extensible Python project manager for environments, builds, and publishing.
pypa/github.com/pypa/hatch /7,247 stars /
Install and run Python applications in isolated environments. Like npx in Node.js.
pypa/github.com/pypa/pipx /12,981 stars /
Cross-platform, Python-agnostic binary package manager.
conda/github.com/conda/conda /7,546 stars /

Build Backends 5 projects

The historical and still most widely used pyproject build backend.
pypa/github.com/pypa/setuptools /2,872 stars /
Modern, extensible build backend from the hatch project.
pypa/github.com/pypa/hatch /7,247 stars /
Poetry's PEP 517 build backend, usable without Poetry itself.
Minimal, dependency-free build backend for pure-Python packages.
pypa/github.com/pypa/flit /2,260 stars /
uv's fast, minimal build backend for pure-Python projects.
astral-sh/github.com/astral-sh/uv /91,340 stars /

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.