test.pypi 上的模块无法安装依赖项,即使它们存在

module on test.pypi can't install dependencies, even though they exist

我已经完成了这个小包,我想在我的社区分发。它现在在 test.pypi 上,当我想尝试安装它时,它给出了找不到依赖项的错误。

setup.py

...
install_requires=[
    'defcon>=0.6.0',
    'fonttools>=3.31.0'
]
...

抛出这个错误

ERROR: Could not find a version that satisfies the requirement defcon>=0.6.0 (from sameWidther==0.6) (from versions: none)
ERROR: No matching distribution found for defcon>=0.6.0 (from sameWidther==0.6)

但是当我手动安装时,它有效

pip install 'fonttools>=3.6.0'
pip install 'defcon>=0.6.0'

-i URL,或--index-url URL表示"use URL for installing packages from exclusively"。通过传递 -i https://test.pypi.org/simple/,您因此禁止从 PyPI (https://pypi.org/simple) 搜索和下载包。要同时使用这两个索引,请使用 --extra-index-url:

$ python -m pip install --extra-index-url https://test.pypi.org/simple/ sameWidther