Find Default Pip Index-Url
Is There a Way to Find Which Url(S) My Pip Command Will Look for When Running Something Like Pip Install? You Can Configure Files Like. Pip/Pip. Conf And...
Is there a way to find which url(s) my pip command will look for when running something like pip install <package>?
You can configure files like .pip/pip.conf and .pypirc to modify that default but I'd like to know if there is a way to know the mirror priority.
Can I look for something specific running a command with the verbose flag (-v)?
2 Answers
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 ).
...
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 =
$ pip install -h
...
-i, --index-url <url> Base URL of Python Package Index (default ).
...
pip3 config list prints the config. Config file locations are documented . For me, it was located in /etc/pip.conf.