# 错误：setuptools.errors.PackageNotFoundError：'data_files' 模式 'config/*.ini' 未匹配任何文件

- **ID:** `python/setuptools-extra-files-not-found`
- **领域:** python
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

setup.cfg 或 setup.py 中指定的 glob 模式在包中未找到任何文件。

## 版本兼容性

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

## 解决方案

1. **Correct the path to the actual files** (95% 成功率)
   ```
   Ensure the config directory exists and contains .ini files. Example: mkdir config; touch config/settings.ini
   ```
2. **Use package_data instead of data_files** (90% 成功率)
   ```
   In setup.cfg: [options.package_data]
* = config/*.ini
   ```

## 无效尝试

- **Changing the pattern to '*.ini' without a directory** — May match unintended files; also doesn't solve the path issue. (60% 失败率)
- **Removing the data_files configuration entirely** — Necessary files will be missing from the distribution. (80% 失败率)
