# error: package directory 'src/mypackage' does not exist

- **ID:** `python/setuptools-package-dir-not-found`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The directory specified in 'packages' or 'package_dir' does not exist on disk.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.8 | active | — | — |

## Workarounds

1. **Create the missing directory with __init__.py** (95% success)
   ```
   mkdir -p src/mypackage
touch src/mypackage/__init__.py
   ```
2. **Update setup.py to match existing structure** (90% success)
   ```
   from setuptools import find_packages
setup(
    packages=find_packages(where='src'),
    package_dir={'': 'src'}
)
   ```

## Dead Ends

- **Creating a placeholder __init__.py in wrong location** — The directory structure must match exactly; wrong location doesn't fix. (80% fail)
- **Removing package_dir entirely** — Breaks package discovery; setuptools may look in wrong place. (60% fail)
