Post #1544996
2026-03-21 05:27 UTC
@draeath @veronica If a project uses PDM, then any new contributor needs only to clone the git repository and execute 'pdm install' to get going. That command will automatically create the virtual environment.
For that to work, PDM obviously needs to be installed outside of your not-yet-existing project's virtual environment to be available. That typically leaves you with two options to install PDM:
pip install --user pdm
pipx install pdm
If you install more than one package into your user directory, then 'pip install --user' can lead to a dependency conflict.
'pipx install' avoids dependency conflicts because it isolates packages from one another. Thus pipx is the preferable command of those two.
In the case of PDM, you could also just rely on the official shell script for installation, which just downloads a "zip file" and extracts its contents to ~/.local/bin/pdm, but not every tool provides such a shell script. And if you've familiarized yourself with pipx already, it's convenient and a consistent experience to use it for everything.
#python
Replies (1)
-
@draeath@infosec.exchange 2026-03-21 12:36
@davidculley @veronica it seems like creating a venv isn't that difficult, especially so when one already is comfortable with python. I do it all the time. The only pain point is when one needs a particular interpreter version (doubly so if the OS package manager doesn't offer it). I'll acknowledge one needs a solution for that.