python install_error ai_generated true

ERROR: Package 'package' requires a different Python: 3.9.0 not in '>=3.10'

ID: python/setuptools-requires-python-mismatch

Also available as: JSON · Markdown · 中文
80%Fix Rate
87%Confidence
0Evidence
2024-06-25First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3.x active

Root Cause

The package's requires-python metadata specifies a Python version range that does not include the current interpreter.

generic

中文

包的 requires-python 元数据指定的 Python 版本范围不包括当前解释器。

Workarounds

  1. 85% success
    pip install 'package<2.0'  # version that supports Python 3.9
  2. 90% success
    pyenv install 3.10.0; pyenv virtualenv 3.10.0 myenv; pyenv activate myenv; pip install package

Dead Ends

Common approaches that don't work:

  1. 60% fail

    May install a package incompatible with your Python version, leading to runtime errors.

  2. 50% fail

    If the required version is a major jump, it may not be feasible or supported by other dependencies.