Missing an option to prioritize --find-links over --index-url
See original GitHub issue- Pip version: master (f1d0939d63267ec186d7aad07862922f37b3a1e1)
- Python version: any
- Operating system: any
Description:
There is no option to force precedence of a wheelhouse passed to --find-links
over --index-url
(or default index). There is option to disable index completely, but it isn’t always desired if you’d like to keep the default index as a fallback for any packages that are not in the wheelhouse.
This stems from the order being hardcoded here: https://github.com/pypa/pip/blob/f1d0939d63267ec186d7aad07862922f37b3a1e1/pip/index.py#L398-L405
It would be great if this order would be configurable.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
python pip priority order with index-url and extra-index-url
The short answer is: there is no prioritization and you probably should avoid using --extra-index-url entirely. This is asked and answered ...
Read more >A Complete Guide to Link Reclamation: How to Recover Lost ...
First, we need to identify all the broken links on your site. One way to do so is using the Index Coverage Report...
Read more >How to Find and Fix Broken Links in WordPress (Step by Step)
Do you have broken links on your site? Here is how to find and fix broken links in WordPress, the RIGHT way, step...
Read more >pip 1.0.1 - PyPI
The homepage for pip is temporarily located on PyPI – a more proper homepage will ... Allow the -i and --extra-index-url options in...
Read more >--find-links and --index-url Priorities - Google Groups
over all others. So we always got our package if there was any. Now with pip --find-links seems not to do the same....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If I’m understanding the original snippet correctly, packages found via index URLs will always be preferred over ones locally available, in the case where
--find-links
is used and--no-index
is not?At the very least, I think this deserves to be documented somewhere. This feels like very surprising behavior.
My use-case: I compiled tensorflow to take advantage of certain CPU features, and put the wheel into our local wheel directory. But pip happily continued to install the version available at pypi and ignored the one I built locally.
I’m not sure what the right answer is here. Would
--prefer-binary
help at all? I’m not sure if the version of tensorflow available on pypi is a source or binary wheel. I think maybe the best answer is to revert to using--no-index
, but that means we need to pull down more wheels locally than we would have otherwise wanted.I suppose using
--hash
is maybe another option?By preferring a local wheel to one fetched from a remote? 😃
I agree that it’s very desirable for this to be a true property of versioning systems, but it seems important to take note when it’s not the case, and either: