# 错误：setup.py必须与setup.cfg在同一目录中

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

## 根因

当使用setup.cfg进行配置时，setuptools期望setup.py与setup.cfg位于同一目录。

## 版本兼容性

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

## 解决方案

1. **Create a minimal setup.py in the same directory** (95% 成功率)
   ```
   touch setup.py
# Content:
from setuptools import setup
setup()
   ```
2. **Move setup.cfg to the same directory as setup.py** (90% 成功率)
   ```
   mv /path/to/setup.cfg .
   ```

## 无效尝试

- **Removing setup.cfg** — Loses all configuration; may break build. (60% 失败率)
- **Creating empty setup.py in parent directory** — Must be in same directory; parent not checked. (80% 失败率)
