Eventually it was approved and released in 22.2 version
According to the documentation, --dry-run
:
Don’t actually install anything, just print what would be. Can be used
in combination with --ignore-installed to ‘resolve’ the requirements.
For example:
pip install flask --dry-run
prints information about what packages would be installed without installing them (but downloading):
Collecting flask
Using cached Flask-2.2.2-py3-none-any.whl (101 kB)
Collecting Jinja2>=3.0
Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting Werkzeug>=2.2.2
Using cached Werkzeug-2.2.2-py3-none-any.whl (232 kB)
Collecting click>=8.0
Using cached click-8.1.3-py3-none-any.whl (96 kB)
Collecting itsdangerous>=2.0
Using cached itsdangerous-2.1.2-py3-none-any.whl (15 kB)
Collecting MarkupSafe>=2.0
Using cached MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Would install Flask-2.2.2 Jinja2-3.1.2 MarkupSafe-2.1.1 Werkzeug-2.2.2 click-8.1.3 itsdangerous-2.1.2
There are a few other options that were added recently (they're still experimental, pip gives a warning):
Tell me what pip installed:
pip install flask --report /tmp/report.json
Tell me what pip would install:
pip install flask --dry-run --report /tmp/report.json
Tell me what pip would install in an empty environment (aka resolve the requirements):
pip install flask --dry-run --ignore-installed --report /tmp/report.json
--dry-run
option! pip.pypa.io/en/stable/cli/pip_install/#cmdoption-dry-run