python
install_error
ai_generated
true
ERROR: Could not build wheels for <package>, which is required to install pyproject.toml-based projects
ID: python/pip-could-not-build-wheels-required-to-install-pyproject
80%Fix Rate
87%Confidence
0Evidence
2024-04-17First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
| 3.12 | active | — | — | — |
Root Cause
The package uses PEP 517 and pip must build a wheel, but the wheel build fails — typically due to missing C toolchain, missing headers (e.g., libssl-dev), or a compiler error in the C extension.
generic中文
包使用 PEP 517,pip 必须构建 wheel,但 wheel 构建失败——通常由于缺少 C 工具链、缺少头文件(如 libssl-dev),或 C 扩展中的编译器错误。
Workarounds
-
80% success
# Debian/Ubuntu sudo apt-get install -y build-essential python3-dev libssl-dev libffi-dev # macOS brew install openssl@3 pip install <package>
-
75% success
pip install --only-binary=:all: <package> # fallback: download from https://pypi.org/project/<package>/#files
Dead Ends
Common approaches that don't work:
-
90% fail
Cache is not the issue; the compile step fails every time.
-
80% fail
Pre-releases rarely ship wheels for every platform; the compile still fails.