python
install_error
ai_generated
partial
ERROR: Cannot find setup.py or pyproject.toml in the repository
ID: python/pip-install-from-git-no-setup
80%Fix Rate
82%Confidence
0Evidence
2024-11-02First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.x | active | — | — | — |
Root Cause
pip is trying to install a package from a Git repository that lacks a setup.py or pyproject.toml file, so it cannot build the package.
generic中文
pip 尝试从缺少 setup.py 或 pyproject.toml 文件的 Git 仓库安装包,因此无法构建该包。
Workarounds
-
80% success
pip install 'git+https://github.com/user/repo.git#egg=package&subdirectory=path/to/pkg'
-
90% success
pip install package-name
Dead Ends
Common approaches that don't work:
-
90% fail
--no-deps skips dependency resolution but still requires a build backend to install the package itself.
-
95% fail
If setup.py is missing, this also fails.