python install_error ai_generated true

错误:找不到满足要求 foo==2.1.0 的版本(可用版本:无)

ERROR: Could not find a version that satisfies the requirement foo==2.1.0 (from versions: none)

ID: python/pip-could-not-find-version-requirement

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

版本兼容性

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

根因分析

请求的包版本在配置的索引上不存在,或包名拼写错误,或索引不可达。

English

The requested package version does not exist on the configured index, or the package name is misspelled, or the index is unreachable.

generic

解决方案

  1. 90% 成功率
    Run `pip index versions foo` to list available versions, then install an existing one.
  2. 85% 成功率
    Check spelling and use `pip install foo` without pinning, or specify `--extra-index-url https://pypi.org/simple`.

无效尝试

常见但无效的做法:

  1. 95% 失败

    The version genuinely does not exist; retrying does not change index contents.

  2. 85% 失败

    pip version is unrelated to index availability.