如何从Git仓库安装,其中dependency_links指向另一个Git仓库

时间:2017-02-07 13:42:59

标签: python pip

我使用pip install git+http://example.com/some-folder/A.git

项目A的setup.py

install_requires=['B==0.1.0'],
# Dependencies
dependency_links=[
    'http://example.com/some-folder/B.git@0.1.0',
]

输出结果为:

Could not find a version that satisfies the requirement B==0.1.0 (from A==0.3.0) (from versions: )

No matching distribution found for B==0.1.0 (from A==0.3.0)

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

Pip默认忽略dependency_links。要更改此设置,您需要指定--process-dependency-links选项:

pip install --process-dependency-links git+http://example.com/some-folder/A.git