# 错误：找不到满足 <package> 要求的版本（来自版本：无）。未找到匹配的发行版（此平台没有可用的二进制文件）

- **ID:** `pip/no-binary-available-for-platform`
- **领域:** pip
- **类别:** install_error
- **错误码:** `ERROR`
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

请求的包没有针对用户平台（例如 aarch64、32 位或不支持的操作系统）的预构建 wheel，并且由于缺少构建依赖项或平台不兼容，pip 无法从源代码构建。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| pip 22.0+ | active | — | — |
| Python 3.11 | active | — | — |
| aarch64 | active | — | — |

## 解决方案

1. ```
   通过安装构建依赖项允许 pip 从源代码构建：pip install <package> --no-binary :all:
   ```
2. ```
   使用为你的平台提供 wheel 的第三方仓库（例如 conda-forge 用于 aarch64）：conda install -c conda-forge <package>
   ```
3. ```
   在兼容的机器上交叉编译 wheel 并传输：pip wheel <package> --wheel-dir=./wheels/ && pip install --no-index --find-links=./wheels/ <package>
   ```

## 无效尝试

- **Using --only-binary=:all: flag** — This flag forces pip to only use binary wheels, but if none exist for the platform, it will fail immediately with the same error. (100% 失败率)
- **Installing with --no-index and pointing to a local directory with wrong wheels** — Providing wheels built for a different architecture (e.g., x86_64 on arm64) will cause incompatible binary errors or segfaults at runtime. (90% 失败率)
- **Downgrading pip to an older version** — Older pip versions have the same or worse platform detection; the issue is with the package availability, not pip version. (20% 失败率)
