brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: pip install --dry-run shows what pip would install

Pip
~/tips/pip-dry-run

python3 -m pip install --dry-run requests

Lists the packages pip would install, without installing or changing anything.

Before I add a package to an environment, I want to know how much it brings along. pip can tell me without touching anything.

python3 -m pip install --dry-run requests

It resolves the dependencies and prints a line starting with Would install and the list of packages with their versions. Nothing is changed in the environment. The option exists since pip 22.2.

Caveat: pip may still download files to work out the dependencies, so a dry run is not completely free. It also checks against the environment you are in, so activate the right virtual environment first.

Further reading: pip install documentation

More Pip tips urllib3<2 python3 -m pip download -r requirements.txt -d ./wheels python3 -m pip config set global.timeout 60 python3 -m pip index versions requests python3 -m pip download requests==X.Y.Z --no-deps -d ./pkgs All Pip tips (9) All topics

Link