python config_error ai_generated true

错误:python_requires='>=3.7' 但已安装的 Python 版本是 3.6.9

error: python_requires='>=3.7' but the installed Python version is 3.6.9

ID: python/setuptools-python-requires-error

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

版本兼容性

版本状态引入弃用备注
3.6 active
3.7 active
3.8 active

根因分析

该包指定了当前解释器不满足的最低 Python 版本。

English

The package specifies a minimum Python version that is not satisfied by the current interpreter.

generic

解决方案

  1. 95% 成功率 Upgrade Python to a supported version
    Install Python 3.7+ from python.org or use a version manager like pyenv: `pyenv install 3.9.10 && pyenv global 3.9.10`
  2. 90% 成功率 Use a virtual environment with a compatible Python version
    `python3.7 -m venv myenv && source myenv/bin/activate && pip install package`

无效尝试

常见但无效的做法:

  1. Ignoring the error and forcing installation with --ignore-requires-python 90% 失败

    This flag does not exist; pip will still enforce python_requires.

  2. Downgrading the package to an older version that supports Python 3.6 50% 失败

    The older version may have other issues or missing features.