【发布时间】:2011-01-29 10:41:45
【问题描述】:
我想将 repoze Zope2 安装的所有要求放在 pip requirements file 中。大多数 repoze 包似乎不在 PyPi 上,但有一个可供它们使用的替代 PyPi 索引here。但我不知道如何告诉 pip 将该索引与需求文件一起使用。对于单个包,很容易
pip install zopelib -i http://dist.repoze.org/zope2/2.10/simple/
我尝试了以下
pip install -r requirements.txt -i http://dist.repoze.org/zope2/2.10/simple/
或在我的 requirements.txt 中所有这些类型或排列:
zopelib -i http://dist.repoze.org/zope2/2.10/simple/
zopelib --index http://dist.repoze.org/zope2/2.10/simple/
-i http://dist.repoze.org/zope2/2.10/simple/ zopelib
或(因为documentation 表示“请注意,所有这些选项都必须单独一行。”)
--index http://dist.repoze.org/zope2/2.10/simple/
zopelib
那么,告诉 pip 使用http://dist.repoze.org/zope2/2.10/simple/ 作为索引的正确方法是什么?
【问题讨论】:
-
您在上次尝试中非常接近;这个选项的全名是
--index-url而不是--index。 -
文档(
The following options are supported部分):pip.pypa.io/en/stable/reference/pip_install/…