Python 从PyPI安装失败,版本不满意,但手动安装时PyPI中存在这些版本
我在尝试从PyPI安装包时遇到一些奇怪的行为 当我跑的时候Python 从PyPI安装失败,版本不满意,但手动安装时PyPI中存在这些版本,python,pypi,Python,Pypi,我在尝试从PyPI安装包时遇到一些奇怪的行为 当我跑的时候 pip install -i https://test.pypi.org/simple/ simple-api==0.0.0.0.5 它失败了 ERROR: Could not find a version that satisfies the requirement singledispatch>=3.4.0.3 (from graphene-django->simple-api==0.0.0.0.5) (from ve
pip install -i https://test.pypi.org/simple/ simple-api==0.0.0.0.5
它失败了
ERROR: Could not find a version that satisfies the requirement singledispatch>=3.4.0.3 (from graphene-django->simple-api==0.0.0.0.5) (from versions: none)
ERROR: No matching distribution found for singledispatch>=3.4.0.3 (from graphene-django->simple-api==0.0.0.0.5)
然而,当我运行pip install singledispatch>=3.4.0.3
时,版本要求突然之间就没有问题了。在我以这种方式手动修复了几个包之后,pip安装我的包没有问题
setup.py的可能相关部分:
install_requires=[
"django",
"graphene",
"graphene-django",
],
有人知道问题出在哪里吗?如果需要更多信息,请在评论中告诉我,我将编辑问题。看起来有些“生产”包没有上传到测试索引https://test.pypi.org/
如果要添加额外的包索引,请使用--额外索引url
而不是-i
:
pip install --extra-index-url https://test.pypi.org/simple/ simple-api==0.0.0.0.5
哇,它确实是这样工作的!下次我可能不应该只是从教程中复制粘贴。非常感谢。