# ERROR: Invalid config file at /etc/pip.conf: Expected a section header but found 'global'

- **ID:** `python/pip-config-file-parse-error`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The pip config file has a malformed INI syntax, often due to missing brackets around section names or stray indentation.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.8 | active | — | — |
| 3.9 | active | — | — |
| 3.10 | active | — | — |
| 3.11 | active | — | — |
| 3.12 | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   Ensure sections look like `[global]` and keys like `index-url = https://pypi.org/simple`; validate with `python -c "import configparser; c=configparser.ConfigParser(); c.read('/etc/pip.conf')"`
   ```
2. **** (90% success)
   ```
   pip config list -v
   ```

## Dead Ends

- **** — Loses intentional settings such as corporate index URLs and trusted hosts. (50% fail)
- **** — Ignores all pip configuration, including required mirrors and certs. (60% fail)
- **** — Isolated mode ignores user config but still parses the system config file. (70% fail)
