python
config_error
ai_generated
true
错误:[Errno 2] 没有这样的文件或目录:'setup.py'
error: [Errno 2] No such file or directory: 'setup.py'
ID: python/pip-egg-info-build-failure
80%修复率
85%置信度
0证据数
2025-03-20首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.x | active | — | — | — |
根因分析
在错误的目录下运行构建/安装,或项目仅使用 pyproject.toml 布局。
English
Running build/install from the wrong directory or a project using pyproject.toml-only layout.
解决方案
-
95% 成功率
cd /path/to/project python -m pip install .
-
90% 成功率
python -m build --sdist --wheel
无效尝试
常见但无效的做法:
-
75% 失败
Breaks PEP 517 builds and confuses tooling.
-
85% 失败
Still wrong directory; file remains missing.