# ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/path/to/package.egg-info/PKG-INFO'

- **ID:** `python/pip-egg-info-directory-error`
- **Domain:** python
- **Category:** install_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The package's egg-info directory is missing or corrupted, often due to an interrupted build or manual deletion, causing pip to fail during metadata extraction.

## Version Compatibility

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

## Workarounds

1. **Rebuild the package from source to regenerate egg-info** (85% success)
   ```
   pip install --no-build-isolation --no-cache-dir --force-reinstall /path/to/package
   ```
2. **Manually create the egg-info directory if missing** (75% success)
   ```
   mkdir -p /path/to/package.egg-info && touch /path/to/package.egg-info/PKG-INFO
   ```

## Dead Ends

- **Reinstalling with --no-cache-dir** — The cache is not the issue; the egg-info is missing from the source, so cache clearing doesn't help. (70% fail)
- **Running pip install as root** — Permission changes don't recreate missing egg-info files; the problem persists regardless of user privileges. (80% fail)
