python install_error ai_generated true

错误:找不到满足要求 some-package 的版本(可用版本:无)

ERROR: Could not find a version that satisfies the requirement some-package (from versions: none)

ID: python/pip-installation-error-no-matching-distribution

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

版本兼容性

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

根因分析

包名拼写错误、包在 PyPI 上不存在,或使用的索引中没有该包。网络问题导致无法获取包列表时也会发生。

English

The package name is misspelled, the package does not exist on PyPI, or the index being used does not have it. Also occurs when network issues prevent fetching the package list.

generic

解决方案

  1. 95% 成功率
    Double-check the package name on PyPI (https://pypi.org). Use pip search (if available) or web search to find correct name.
  2. 80% 成功率
    If behind a proxy, set environment variables: export HTTP_PROXY=http://proxy:port and HTTPS_PROXY=https://proxy:port.

无效尝试

常见但无效的做法:

  1. 60% 失败

    If the package name is wrong, no index will have it; if network is down, still fails.

  2. 90% 失败

    Cache is not the issue if the package doesn't exist; clearing doesn't help.