pdm
A modern Python package and dependency manager supporting the latest PEP standards
Command-line tool for managing Python project dependencies using the standard pyproject.toml file, like Poetry but letting you choose any build backend and optionally using a fast Rust installer.
PDM is a command-line tool for managing Python projects and their dependencies. When you build a Python project, you typically need a way to install the libraries your code depends on, keep track of exactly which versions are installed, and share that information with others working on the same code. PDM handles all of that.
At its core, PDM reads and writes a file called pyproject.toml, which has become the standard place for Python project configuration. It also creates a lock file that records the precise version of every installed package, so that anyone else who sets up the project gets the same environment. You can add a new dependency with a single command like pdm add requests flask, and PDM resolves which versions work together and updates both files.
The README positions PDM alongside two other popular tools, Pipenv and Poetry. Pipenv manages environments but cannot build packages for distribution. Poetry can build and publish packages but locks users into its own build backend. PDM aims to cover the same ground as Poetry while letting developers choose any build backend they prefer, rather than imposing one.
PDM can manage virtual environments the way Pipenv does, keeping them inside the project folder or in a central location. It also supports an experimental mode based on a Python standards proposal (PEP 582) where packages are installed directly into a local project folder rather than a virtual environment, similar to how JavaScript projects install packages into a node_modules folder. An optional integration with a fast Rust-based package installer called uv is available for faster installs.
Installation is done through a one-line script for Linux, Mac, or Windows, or via a standalone binary download. PDM requires Python 3.9 or higher. It is open source under the MIT license.
Where it fits
- Start a new Python project with one command that sets up pyproject.toml, a virtual environment, and a lock file.
- Switch a team project from pip and requirements.txt to PDM so every developer gets the exact same package versions.
- Add new dependencies with a single command and have PDM resolve version conflicts and update the lock file.
- Speed up package installs on a slow CI pipeline by enabling the optional uv Rust-based installer.