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

- **ID:** `python/setuptools-missing-package-data`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The setup.py or setup.cfg references a package data directory that does not exist in the source tree.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   mkdir -p mypackage/data && touch mypackage/data/__init__.py
   ```
2. **** (90% success)
   ```
   In setup.py, change include_package_data=True to a proper MANIFEST.in or package_data dict.
   ```

## Dead Ends

- **** — Empty directories are often ignored; the build may still fail if the directory is expected to contain files. (60% fail)
- **** — Removing it may exclude necessary data files from the distribution. (40% fail)
