PDM, as described, is a modern Python package and dependency manager supporting the latest PEP standards. But it is more than a package manager. It boosts your development workflow in various aspects.
On Windows, if you do not have the optional py launcher installed (including if you installed Python through the Microsoft store), replace py with python.
For security reasons, you should verify the checksum of install-pdm.py.
It can be downloaded from install-pdm.py.sha256.
For example, on Linux/Mac:
4
curl-sSLOhttps://pdm-project.org/install-pdm.py
curl-sSLhttps://pdm-project.org/install-pdm.py.sha256|shasum-a256-c-
# Run the installer
python3install-pdm.py[options]
The installer will install PDM into the user site and the location depends on the system:
$HOME/.local/bin for Unix
$HOME/Library/Python/<version>/bin for MacOS
%APPDATA%\Python\Scripts on Windows
You can pass additional options to the script to control how PDM is installed:
By copying the Pyprojectx wrapper scripts to a project, you can install PDM as
(npm-style) dev dependency inside that project. This allows different projects/branches to use different PDM versions.
If you installed PDM using a third-party package management tool like Homebrew, you can also uninstall PDM using the tool's uninstall method, such as brew uninstall pdm.
PDM supports generating completion scripts for Bash, Zsh, Fish or Powershell. Here are some common locations for each shell:
2
pdmcompletionbash>/etc/bash_completion.d/pdm.bash-completion# Requires root (sudo). For an alternative, see next
pdmcompletionbash>~/.bash_completion# Does not require root (sudo). Installed only for your user account2
# Make sure ~/.zfunc is added to fpath, before compinit.
pdmcompletionzsh>~/.zfunc/_pdm