# 错误：包数据文件 'data/config.yaml' 未找到

- **ID:** `python/setuptools-package-data-not-included`
- **领域:** python
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

包数据文件在源代码树中缺失，或未在 setup.py 中指定。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.9 | active | — | — |
| 3.10 | active | — | — |

## 解决方案

1. **Create the missing file or adjust setup.py** (90% 成功率)
   ```
   Ensure file exists and add include_package_data=True and package_data={'': ['data/*.yaml']} in setup()
   ```
2. **Use setuptools_scm to auto-include** (70% 成功率)
   ```
   pip install setuptools_scm and configure accordingly
   ```

## 无效尝试

- **Adding the file to the wrong directory** — Path mismatch. (50% 失败率)
- **Using MANIFEST.in incorrectly** — May not include data files in wheel. (40% 失败率)
