# ERROR: Invalid config file: /home/user/.config/pip/pip.conf
  TOMLDecodeError: Expected '=' after a key in a key/value pair (at line 3, column 4)

- **ID:** `python/pip-pip-conf-invalid-toml`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

pip.conf (or pip.toml) contains malformed TOML/INI — a missing '=', a stray quote, or mixing INI and TOML syntax. pip refuses to read any config, so every pip command fails.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   # ~/.config/pip/pip.conf
[global]
index-url = https://pypi.org/simple
timeout = 60
   ```
2. **** (90% success)
   ```
   python -c "import tomllib; tomllib.load(open('/home/user/.config/pip/pip.conf','rb'))"
   ```
3. **** (85% success)
   ```
   PIP_CONFIG_FILE=/dev/null pip install <pkg>
   ```

## Dead Ends

- **** — pip can't read its config to start. (95% fail)
- **** — Config parsing happens before cache logic. (90% fail)
- **** — The malformed config file is still parsed and errors. (85% fail)
