Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i declare more than one extra-index-url in pip.conf

Tags:

python

pip

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.

like image 751
Mandragor Avatar asked Aug 12 '16 20:08

Mandragor


People also ask

What is pip default index URL?

Base URL of the Python Package Index (default https://pypi.org/simple).

What is pip find links?

You're telling pip to find what you want to install on that page; and that page is in a predictable format as per PEP 503. The index will only list packages it has available. find-links is an array of locations to look for certain packages.

Where is pip INI in Windows?

On Windows the configuration file is: %HOME%\pip\pip. ini.


1 Answers

Although the example in the docs is for --find-links, it says:

Appending options like --find-links can 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.

like image 91
2rs2ts Avatar answered Oct 08 '22 00:10

2rs2ts