question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Command to know what file would be downloaded for a requirement

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
pradyunsgcommented, Jun 24, 2022

I think so, yes.

1reaction
uranusjrcommented, Sep 23, 2021

Neither pip index version now and #10052 covers what I originally needed. I was looking for the information “what file will be downloaded when I install this requirement”. Both features you linked only operate at the version level, but I need the information at the file level. Numpy 1.16.3, for example, contains 22 wheels and 1 sdist, I want to know which one will be selected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Python Requirements File and How to Create it
Use the pip install -r requirements. txt command to install all of the Python modules and packages listed in your requirements. txt file....
Read more >
How to query files, packages, and repositories in Linux
The which command locates a file if it's in your path. You will need to locate a file before you can further identify...
Read more >
python - How can I install packages using pip according to the ...
This works for everyone: pip install -r /path/to/requirements.txt. Explanation: -r, --requirement < filename >. Install from the given ...
Read more >
PowerShell wget : Awesome Way to Download a File
Learn how to leverage PowerShell like a PowerShell wget to download a file URL in this step-by-step demo tutorial.
Read more >
Downloading files with wget - Knowledge Base - Pair Networks
The wget command is an internet file downloader that can download anything from files and webpages all the way through to entire websites....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found