python -m pip config [<file-option>] list python -m pip config [<file-option>] [--editor <editor-path>] edit python -m pip config [<file-option>] get command.option python -m pip config [<file-option>] set command.option value python -m pip config [<file-option>] unset command.option python -m pip config [<file-option>] debug
创建 ~/.pip/
其他:
Global
In a “pip” subdirectory of any of the paths set in the environment variable XDG_CONFIG_DIRS
(if it exists), for example /etc/xdg/pip/pip.conf
.
This will be followed by loading /etc/pip.conf
.
User
$HOME/.config/pip/pip.conf
, which respects the XDG_CONFIG_HOME
environment variable.
The legacy “per-user” configuration file is also loaded, if it exists: $HOME/.pip/pip.conf
.
Site
$VIRTUAL_ENV/pip.conf
字段
timeout = 60 index-url = https://download.zope.org/ppix
ignore-installed = true no-dependencies = yes
no-cache-dir = false [install] no-compile = no no-warn-script-location = false
http信任
trusted-host = mirror1.example.com mirror2.example.com