python
install_error
ai_generated
true
ERROR: file:///path/to/project does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.
ID: python/pip-setup-py-not-found
80%Fix Rate
90%Confidence
0Evidence
2024-05-16First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
| 3.12 | active | — | — | — |
Root Cause
pip was pointed at a directory (or VCS URL) that lacks the build metadata files it needs to identify a Python package.
generic中文
pip 被指向一个缺少构建元数据文件的目录(或 VCS URL),无法识别为 Python 包。
Workarounds
-
95% success
Point pip at the actual package directory that contains setup.py or pyproject.toml, or install from the parent with `pip install ./project`.
-
90% success
If the project uses only setup.cfg, add a minimal pyproject.toml: `[build-system]\nrequires=['setuptools>=61']\nbuild-backend='setuptools.build_meta'`.
Dead Ends
Common approaches that don't work:
-
90% fail
Skipping deps does not change the metadata discovery step; the same error is raised.
-
95% fail
The error is about the target directory, not the pip version.