# ERROR: File 'setup.cfg' not found for legacy editable install of '<package>'

- **ID:** `pip/error-installing-packages-in-editable-mode-with-pyproject-toml-and-no-setup-cfg`
- **Domain:** pip
- **Category:** build_error
- **Error Code:** `ERROR`
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

Pip is attempting a legacy editable install (pip install -e .) for a project that has a pyproject.toml but no setup.cfg, and the build backend doesn't support PEP 660 editable installs.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| pip 21.3-23.2 | active | — | — |
| Python 3.8-3.12 | active | — | — |
| setuptools 64+ | active | — | — |
| flit-core 3.8+ | active | — | — |

## Workarounds

1. **pip install -e . --no-build-isolation** (75% success)
   ```
   pip install -e . --no-build-isolation
   ```
2. **pip install --editable . --config-settings editable_mode=strict** (80% success)
   ```
   pip install --editable . --config-settings editable_mode=strict
   ```
3. **pip install -e . --no-use-pep517 && pip install --no-deps --force-reinstall --no-build-isolation -e .** (85% success)
   ```
   pip install -e . --no-use-pep517 && pip install --no-deps --force-reinstall --no-build-isolation -e .
   ```

## Dead Ends

- **Creating an empty setup.cfg file in the project root** — Pip requires a properly formatted setup.cfg with package metadata; an empty file does not satisfy the legacy editable install mechanism. (95% fail)
- **Downgrading pip to version 21.2 or earlier** — Older pip versions may not support pyproject.toml-based builds properly, leading to other errors. (80% fail)
- **Using --no-use-pep517 flag** — This flag forces legacy setup.py install, which still requires setup.cfg for editable mode. (90% fail)
