Description
What's the problem this feature will solve?
I want to know what version (and potentially ahich artifact) would be downloaded/installed when I pip install
a package. Currently I do something like pip download --no-deps --dest %TMP%
and read the output, but that can take a long time if the package is large (e.g. numpy).
Describe the solution you'd like
Something like pip find numpy
to only execute the finding part, but instead of downloading (and inspecting) the package, print the link that would be downloaded instead:
$ py -3.7 -m pip find numpy
https://files.pythonhosted.org/packages/4e/9d/c129d78e6b942303b762ccfdf1f8339de80c5e6021b14ef0c99ec5bdc6aa/numpy-1.16.3-cp37-cp37m-win_amd64.whl
Alternative Solutions
My current approach is described above. Alternative design includes pip install --dry-run
, but that does not feel right because it implies dependency resolution (which requires the package to be downloaded).
An alternative output is to list all applicable links, instead of only the best match.
Additional context
A command that automatically download packages (to a temporary location) and produce a requirements.txt could be useful as well, but I can write a script using existing pip commands easily enough, so pip don’t really need to provide that functionality.