Skip to content
Latchkey

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-url

Common 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 requests

Options

Scope flagTargets
--globalSystem-wide config file
--userPer-user config file
--siteThe active environment’s config

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →