'How do i declare more than one extra-index-url in pip.conf
Where would I set this in pip.conf?
I want to add two(2) extra-index-urls in pip.conf, but I did not find a solution how to do this after some research in the docs.
Solution 1:[1]
Although the example in the docs is for --find-links, it says:
Appending options like
--find-linkscan be written on multiple lines:
[global]
find-links =
http://download.example.com
[install]
find-links =
http://mirror1.example.com
http://mirror2.example.com
So I believe you may be able to do the same for extra-index-url. While I am having issues with the indices I'm using to test, I can confirm that passing the argument twice at the command line has the same effect as separating the two indices on multiple lines like this example does.
edit: I can confirm that this does indeed work for extra-index-url.
Solution 2:[2]
Try with index-url plus extra-index-urls, for example:
#content of ~/.config/pip/pip.conf
[global]
index-url=https://<some-other-index>
extra-index-url=https://pypi.org/simple
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | aless80 |
