Python test.pypi上的模块可以';不要安装依赖项,即使它们存在
我已经完成了这个我想在我的社区中分发的小程序包。它现在在test.pypi上,当我想尝试安装它时,它会出现一个错误,即找不到依赖项 setup.pyPython test.pypi上的模块可以';不要安装依赖项,即使它们存在,python,setuptools,pypi,Python,Setuptools,Pypi,我已经完成了这个我想在我的社区中分发的小程序包。它现在在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 sa
...
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
表示“使用URL以独占方式安装软件包”。通过传递-ihttps://test.pypi.org/simple/因此,您禁止从PyPI搜索和下载软件包(https://pypi.org/simple
)。要使用这两个索引,请使用--额外索引url
:
$ python -m pip install --extra-index-url https://test.pypi.org/simple/ sameWidther
您安装了不同的Python解释器。使用python-V
@TinNguyen验证版本是的,我有更多,使用pyenv
pip正确链接。问题是,为什么pip不能fand依赖项,但可以在我单独键入命令时安装它们?您所指的pip
被另一个python
解释器使用<代码>python-MPIP安装'fonttools>=3.6.0'
。尝试找到正确的python解释器python-V
,python3-V
,py-V
,py3-V
。或者使用其完整路径调用python。您可以使用windows上的where python
和windows上的which python
获取当前python的路径linux@TinNguyen我拥有的所有PIP都可以手动安装这两个模块。您认为在该模块上运行pip安装会调用f.e.python2的pip,并尝试安装那些python2不可用的软件包?它们实际上对它们是可用的,python2的pip安装了它们。如何传递TestPyPI索引URL?您可能正在覆盖PyPI索引。