# ERROR: File 'setup.cfg' not found for legacy editable install of '<package>'. A setup.cfg or pyproject.toml is required for editable installs.

- **ID:** `pip/editable-install-no-setup-cfg`
- **Domain:** pip
- **Category:** install_error
- **Error Code:** `ERROR`
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Pip's legacy editable install mode (using setup.py develop) requires a setup.cfg file with metadata, but it is missing from the project directory.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| pip 23.1 | active | — | — |
| pip 23.2 | active | — | — |
| pip 24.0 | active | — | — |
| setuptools 68.0 | active | — | — |

## Workarounds

1. **Add a setup.cfg file with minimum metadata:
[metadata]
name = <package>
version = 0.1.0
[options]
packages = find:** (90% success)
   ```
   Add a setup.cfg file with minimum metadata:
[metadata]
name = <package>
version = 0.1.0
[options]
packages = find:
   ```
2. **Use modern editable install: pip install -e . --config-settings editable_mode=compat** (85% success)
   ```
   Use modern editable install: pip install -e . --config-settings editable_mode=compat
   ```
3. **Upgrade to pip 21.3+ and use pyproject.toml with setuptools backend:
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"** (95% success)
   ```
   Upgrade to pip 21.3+ and use pyproject.toml with setuptools backend:
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
   ```

## Dead Ends

- **** — Still uses legacy editable mode; missing setup.cfg causes the same error. (90% fail)
- **** — An empty setup.cfg lacks required metadata fields (name, version), causing a different error later. (80% fail)
- **** — This changes the source but still requires the target project to have proper structure; often fails with same error. (60% fail)
