How can I get pip to list the repositories it’s using?

Update for 21.1.2

(copied from @Bryan Roach’s comment):

pip download --no-cache-dir --verbose "foo<0" 2>&1 |grep 'location(s) to search' -A5

Update for pip>=20

The repositories are now listed by default, no need to pass the --verbose arg:

$ pip download --no-cache-dir "foo<0" 2>&1 | grep Looking
Looking in indexes: https://pypi.org/simple, https://my-index.local, http://127.0.0.1:9000

Original answer

The repositories where pip searches for packages are displayed when using --verbose flag: pip install --verbose ... or pip download --verbose .... Specify some non-existent requirement so pip does not actually download/install anything. Example:

$ pip download --no-cache-dir --verbose "foo<0" 2>&1 | grep Looking
Looking in indexes: https://pypi.org/simple, https://my-index.local, http://127.0.0.1:9000

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)