Per-user:
On Unix the default configuration file is: $HOME/.config/pip/pip.conf which respects the XDG_CONFIG_HOMEenvironment variable.
On macOS the configuration file is $HOME/Library/Application Support/pip/pip.conf if directory $HOME/Library/Application Support/pip exists else $HOME/.config/pip/pip.conf.
On Windows the configuration file is %APPDATA%\pip\pip.ini.
如果文件不存在,则需要自己创建。
转自 https://www.jianshu.com/p/ed2f23b70771
原文:https://www.cnblogs.com/jackju/p/14703190.html