pip config: Manage pip Settings in CI
Set index URLs, timeouts, and other pip defaults without long flags.
pip config reads and writes pip’s configuration files. CI uses it to set a private index or longer timeouts once instead of repeating flags on every install.
What it does
Manages pip configuration at global, user, or site scope. Subcommands include list, get, set, unset, and edit. Settings persist in pip.conf (pip.ini on Windows).
Common usage
Terminal
pip config list
pip config set global.index-url https://pypi.example.com/simple
pip config set global.timeout 60
pip config unset global.index-urlCommon CI gotcha: wrong scope
On ephemeral runners, a --user scoped setting may not apply where the build later runs (e.g. as another user or in a container). Use --site or --global, or set PIP_INDEX_URL as an env var instead.
Terminal
# Per-environment via env var (no file needed):
export PIP_INDEX_URL=https://pypi.example.com/simple
pip install requestsOptions
| Scope flag | Targets |
|---|---|
| --global | System-wide config file |
| --user | Per-user config file |
| --site | The active environment’s config |
Related guides
pip index versions: List Available VersionsHow pip index versions lists the versions of a package on an index, why it is marked experimental, and how to…
pip install --no-cache-dir: Disable the pip CacheWhen to use pip install --no-cache-dir - smaller Docker images and avoiding stale cached wheels - plus the tr…
pip install: Usage, Options & Common CI ErrorsHow pip install works - installing packages, version specifiers, and the options you reach for, plus the CI f…