Last modified: Sep 27, 2026
How to Install PDM in Python
PDM is a modern package manager for Python. It follows the latest packaging standards. It also manages dependencies and virtual environments for you.
Many developers now prefer PDM over older tools. It is fast, reliable, and easy to use. This guide shows you how to install PDM in Python on any system.
What Is PDM?
PDM stands for Python Development Master. It is a dependency manager and package installer. It uses the pyproject.toml file as the single source of truth.
PDM also supports PEP 582. This means it can store packages in a local __pypackages__ folder. You do not always need a virtual environment.
PDM is similar to Poetry and Pipenv. But it follows modern standards more closely. It is a great choice for new Python projects.
Why Use PDM?
PDM offers many benefits for Python developers. Here are the main reasons to use it.
Fast installs. PDM resolves and installs dependencies quickly. It uses a smart caching system.
Standards based. PDM follows PEP standards. Your project stays compatible with modern tools.
Easy lock files. PDM creates a pdm.lock file. This keeps builds reproducible across machines.
Simple workflow. You can add, remove, and update packages with short commands. PDM handles the rest.
These features make PDM a strong choice for both small and large projects.
Prerequisites
Before you install PDM, check your system. You need a few basic things.
First, you need Python 3.7 or higher. PDM does not support older versions.
Second, you need pip or pipx. These tools help you install PDM.
Third, make sure your PATH is set up. This lets you run PDM from any folder.
You can check your Python version with this command.
python --version
You should see output like this.
Python 3.11.4
If your version is too old, update Python first. Then continue with the steps below.
Method 1: Install PDM with pipx
This is the recommended method for most users. Pipx installs PDM in its own isolated environment.
This keeps PDM separate from your other packages. It also avoids dependency conflicts.
First, install pipx if you do not have it.
python -m pip install --user pipx
python -m pipx ensurepath
Now install PDM with pipx.
pipx install pdm
You should see a message like this.
installed package pdm 2.10.0, installed using Python 3.11.4
These apps are now globally available:
- pdm
done! ✨ 🌟 ✨
Now PDM is ready. You can verify it with the pdm --version command.
pdm --version
PDM, version 2.10.0
This method is clean and safe. It is the best choice for most developers.
Method 2: Install PDM with pip
You can also install PDM with pip. This is simple and works on most systems.
Run this command in your terminal.
pip install --user pdm
The --user flag installs PDM for your user account only. This avoids permission errors on Linux and macOS.
After the install, check the version.
pdm --version
If you see the version number, the install worked.
One warning: installing PDM with pip may cause conflicts. This happens if other tools share the same environment. Use pipx if you can.
Method 3: Install PDM with the Official Script
PDM also offers an install script. This works well on Linux and macOS.
Run this command in your terminal.
curl -sSL https://pdm-project.org/install.sh | bash
This script downloads the latest PDM release. It installs it in a local folder.
On Windows, you can use PowerShell instead.
(Invoke-WebRequest -Uri https://pdm-project.org/install.ps1 -UseBasicParsing).Content | Invoke-Expression
This method is quick. It also keeps PDM up to date easily.
Verify the Installation
After any method, check that PDM works. Run the version command.
pdm --version
You should see something like this.
PDM, version 2.10.0
If you get an error, PDM is not in your PATH. Restart your terminal and try again.
On some systems, you may need to reload your shell config. Run source ~/.bashrc or source ~/.zshrc.
Set Up Your First PDM Project
Now that PDM is installed, you can create a project. Go to your project folder.
mkdir myproject
cd myproject
Then run the init command.
pdm init
PDM asks a few questions. It asks for your Python version and project name. Answer them, and PDM creates a pyproject.toml file.
Now add a package. Let us add requests.
pdm add requests
PDM downloads the package and updates the lock file. You will see output like this.
Adding packages to default dependencies: requests
✔ Lock successful
✔ All packages installed successfully
You can now run Python code that uses requests. PDM handles the environment for you.
Common Installation Problems
Sometimes the install fails. Here are common issues and how to fix them.
Command not found. This means PDM is not in your PATH. Add the install folder to PATH or restart your terminal.
Permission denied. This happens on Linux and macOS. Use the --user flag or pipx instead.
Old Python version. PDM needs Python 3.7 or higher. Update Python and try again.
Network errors. A slow or blocked connection can stop the install. Check your internet and retry.
Most problems have simple fixes. Read the error message carefully. It usually tells you what to do.
Updating and Uninstalling PDM
You should keep PDM up to date. New versions bring fixes and features.
If you used pipx, update with this command.
pipx upgrade pdm
If you used pip, update like this.
pip install --user --upgrade pdm
To remove PDM, use the matching uninstall command.
pipx uninstall pdm
Or with pip.
pip uninstall pdm
This keeps your system clean when you no longer need PDM.
Tips for Beginners
Start with pipx. It avoids most problems and keeps things tidy.
Always check your Python version first. Many errors come from old versions.
Use pdm init for every new project. It sets up the right files for you.
Commit your pdm.lock file to version control. This keeps builds the same for everyone.
Read the PDM docs when you get stuck. They are clear and helpful.
Conclusion
Installing PDM in Python is quick and easy. You can use pipx, pip, or the official script. Each method works well.
Pipx is the best choice for most users. It keeps PDM isolated and safe. Pip works too, but watch for conflicts.
After the install, verify it with pdm --version. Then create your first project with pdm init. Add packages with pdm add.
PDM is a modern, standards-based tool. It makes Python packaging simple and fast. Give it a try in your next project. You will likely enjoy the clean workflow it brings.