ERROR
pip
install_error
ai_generated
true
ERROR: Package 'X' has no 'pyproject.toml' or 'setup.py'
ID: pip/package-has-no-pyproject-toml-or-setup-py
80%Fix Rate
85%Confidence
1Evidence
2023-05-10First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| pip 21.3+ | active | — | — | — |
| Python 3.7-3.12 | active | — | — | — |
Root Cause
The package is either not a valid Python package, the index URL is wrong, or the package name is misspelled, causing pip to fail to find any build metadata.
generic中文
该包要么不是有效的 Python 包,要么索引 URL 错误,或者包名拼写错误,导致 pip 无法找到任何构建元数据。
Official Documentation
https://pip.pypa.io/en/stable/topics/packaging/Workarounds
-
70% success pip install --no-index --find-links=/path/to/wheels <package>
pip install --no-index --find-links=/path/to/wheels <package>
-
75% success pip install <package>==<exact_version> --only-binary=:all:
pip install <package>==<exact_version> --only-binary=:all:
-
85% success pip install <package> -i https://pypi.org/simple/ --trusted-host pypi.org
pip install <package> -i https://pypi.org/simple/ --trusted-host pypi.org
中文步骤
pip install --no-index --find-links=/path/to/wheels <包名>
pip install <包名>==<确切版本> --only-binary=:all:
pip install <包名> -i https://pypi.org/simple/ --trusted-host pypi.org
Dead Ends
Common approaches that don't work:
-
Installing the package with --no-build-isolation flag
95% fail
The flag only disables build isolation; if the package has no build files at all, this still fails.
-
Upgrading pip to the latest version
90% fail
The error is about missing package metadata, not pip's resolver or version compatibility.
-
Running pip install with --verbose to get more details
85% fail
Verbose output does not provide missing build files; the root cause remains the same.