index-url extra-index-url install priority order
See original GitHub issue- Pip version: 9.0.1
- Python version: 3.6
- Operating system: Linux
Description:
I have this in my pip.conf
:
[global]
index-url = https://myregistry-xyz.com
extra-index-url = https://pypi.python.org/pypi
Let’s assume packageX
exists in both registries and I run pip install packageX
.
I expect pip to install packageX
from https://myregistry-xyz.com
, but pip will use https://pypi.python.org/pypi
instead.
If I switch the values for index-url
and extra-index-url
I get the same result. pypi is always prioritized.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
python pip priority order with index-url and extra-index-url
I searched a bit but could not find a clear answer. The goal is, to have two pip indexes, one is a private...
Read more >index-url extra-index-url install priority order #8606 - GitHub
The solution surely is to find a way of explicitly installing packages from particular indexes. This way already exists (even without --extra- ......
Read more >Finding and choosing files (index and PackageFinder)
The PackageFinder class is responsible for searching the network and file system for what versions of a package pip can install, and also...
Read more >extra-index-url option is used and package ... - Red Hat Bugzilla
The --extra-index-url means an *extra* source of packages; it's right there in the name. If you want to use a private server, pass...
Read more >Dependency notation including the index URL - Packaging
As far as I know pip does not allow the --index-url flag inline in requirements.txt ... index-url extra-index-url install priority order.
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
Packages are expected to be unique up to name and version, so two wheels with the same package name and version are treated as indistinguishable by pip. This is a deliberate feature of the package metadata, and not likely to change.
Rather than registering a whole load of empty packages on PyPI (which as you say, isn’t that friendly, although probably OK if you use a unique prefix like
mycompany.XXX
), you might want to look at using devpi as a local package cache. I believe that allows you to hold your private packages locally, but “pass through” to PyPI for anything not held in your devpi instance. Then you’d use--index-url
to point to your local devpi as the package index, and skip using PyPI at all.This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.