Find default pip index-url

Solution 1:

The help message for the install command will include the default value next to the --index-url option.

$ pip install -h
...
  -i, --index-url <url>       Base URL of Python Package Index (default https://pypi.python.org/simple).
...

The message may vary slightly depending on your version of pip. If an alternate address is configured, it will appear in that help message.

$ cat ~/.config/pip/pip.conf
[global]
index-url = https://my.local.mirror.com/simple
$ pip install -h
...
  -i, --index-url <url>       Base URL of Python Package Index (default https://my.local.mirror.com/simple).
...

Solution 2:

pip3 config list prints the config. Config file locations are documented https://pip.pypa.io/en/stable/user_guide/#config-file. For me, it was located in /etc/pip.conf.