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.

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:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
pfmoorecommented, Mar 1, 2018

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.

0reactions
lock[bot]commented, Jun 2, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

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