# 错误：file:///path/to/project 似乎不是 Python 项目：既未找到 'setup.py' 也未找到 'pyproject.toml'。

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

## 根因

pip 被指向一个缺少构建元数据文件的目录（或 VCS URL），无法识别为 Python 包。

## 版本兼容性

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

## 解决方案

1. **** (95% 成功率)
   ```
   Point pip at the actual package directory that contains setup.py or pyproject.toml, or install from the parent with `pip install ./project`.
   ```
2. **** (90% 成功率)
   ```
   If the project uses only setup.cfg, add a minimal pyproject.toml: `[build-system]\nrequires=['setuptools>=61']\nbuild-backend='setuptools.build_meta'`.
   ```

## 无效尝试

- **** — Skipping deps does not change the metadata discovery step; the same error is raised. (90% 失败率)
- **** — The error is about the target directory, not the pip version. (95% 失败率)
