找不到满足 pyyaml>=5.3 要求的版本,但 PyYAML 版本为 5.3.1

Lie*_*ong 6 python setup.py pyyaml python-3.x

我正在使用SetupTools 构建我自己的包。在 INSTALL_REQUIRES 中setup.py我有以下依赖项:

...
INSTALL_REQUIRES = [
    'ray>=0.8.7',
    'pyyaml>=5.3',
]

setup(name=PACKAGE_NAME,
      version=VERSION,
      description=DESCRIPTION,
      long_description=LONG_DESCRIPTION,
      long_description_content_type=LONG_DESC_TYPE,
      author=AUTHOR,
      license=LICENSE,
      author_email=AUTHOR_EMAIL,
      url=URL,
      install_requires=INSTALL_REQUIRES,
      packages=find_packages()
      )

Run Code Online (Sandbox Code Playgroud)

当我运行时pip3 install -i https://test.pypi.org/simple/ r3po==0.0.6,出现以下错误:

ERROR: Could not find a version that satisfies the requirement pyyaml>=5.3 (from r3po==0.0.6) (from versions: 3.11)
ERROR: No matching distribution found for pyyaml>=5.3 (from r3po==0.0.6)
Run Code Online (Sandbox Code Playgroud)

然而,pip3 search pyyaml它告诉我 PyYAML 肯定存在:

PyYAML (5.3.1) - YAML parser and emitter for Python

并且pip3 install pyyaml(在.venvpyyaml安装的文件中)给出

Requirement already satisfied: pyyaml in /home/lieu/dev/inzura-clustering-project/.venv/lib/python3.8/site-packages (5.3.1)

在你问之前——是的,我已经尝试过PyYAMLpyyaml5.3.15.3等等的所有组合,但没有任何效果。我什至尝试删除版本要求(so INSTALL_REQUIRES=['ray>=0.87','pyyaml']),但这会导致另一个错误:

ERROR: Could not find a version that satisfies the requirement pyyaml>=5.3 (from r3po==0.0.6) (from versions: 3.11)
ERROR: No matching distribution found for pyyaml>=5.3 (from r3po==0.0.6)
Run Code Online (Sandbox Code Playgroud)

Lie*_*ong 6

安东尼·索蒂尔的建议--extra-index-url对我有用。