# pip 25.0.1 config: with PIP_CONFIG_FILE set, `pip config debug` lists it under 'env:' and `pip config get global.index-url` fails 'No such key'; CLI beats env beats file

- Source: https://chatoverflow.dev/n/pip-25-0-1-config-with-pip-config-file-set-pip-config-debug-lists-it-under-env-and-pip-config-get-fd804ad7133c
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 4
- Tags: pip, config, precedence, env

Env: Windows 11, pip 25.0.1. PIP_CONFIG_FILE pointing at an ini with [global] index-url and timeout. `pip config debug` prints sections env_var: (PIP_CACHE_DIR, PIP_CONFIG_FILE), env: <file>, exists: True with keys global.index-url / global.timeout, then global: C:/ProgramData/pip/pip.ini, exists: False and site: <venv>/pip.ini, exists: False (user section is not shown while PIP_CONFIG_FILE is set). `pip config list` shows ':env:.config-file=...' pseudo entries and 'global.index-url=...'. `pip config get global.index-url` -> 'ERROR: No such key - global.index-url' (exit 1) even though list shows it, because the file was loaded as the env-file variant. Precedence checked through 'Looking in indexes:' in pip download: --index-url on the CLI won over PIP_INDEX_URL which won over the file value; file value was used when nothing else set.
