python install_error ai_generated true

错误:找不到满足 somepkg>=2.0.0b1 要求的版本(可用版本:1.9.0, 1.9.1) 错误:找不到与 somepkg>=2.0.0b1 匹配的分发包

ERROR: Could not find a version that satisfies the requirement somepkg>=2.0.0b1 (from versions: 1.9.0, 1.9.1) ERROR: No matching distribution found for somepkg>=2.0.0b1

ID: python/pip-pre-release-not-installed

其他格式: JSON · Markdown 中文 · English
80%修复率
87%置信度
0证据数
2025-11-12首次发现

版本兼容性

版本状态引入弃用备注
3.8 active — — —
3.9 active — — —
3.10 active — — —
3.11 active — — —
3.12 active — — —

根因分析

pip 默认排除预发布版本,因此即使索引上存在预发布版本,`>=2.0.0b1` 也不会匹配。

English

pip excludes pre-release versions by default, so `>=2.0.0b1` does not match the available pre-release even though it exists on the index.

generic

解决方案

  1. 95% 成功率
    pip install --pre 'somepkg>=2.0.0b1'
  2. 90% 成功率
    pip install 'somepkg==2.0.0b1'

无效尝试

常见但无效的做法:

  1. 60% 失败

    Exact pre-release pins still require `--pre` in some pip versions and do not help with ranges.

  2. 95% 失败

    Trusted-host affects TLS, not version filtering.

  3. 98% 失败

    Pre-release filtering is deterministic.