我想将 repoze Zope2 安装的所有要求放入 pip 在这里。但我不知道如何告诉 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
或(因为 文档 说“请注意,所有这些选项都必须独占一行。”)
--index http://dist.repoze.org/zope2/2.10/simple/
zopelib
那么,告诉 pip 使用 http://dist.repoze.org/zope2/2.10/simple/ 作为索引?
I want to put all the requirements of a repoze Zope2 install in a pip requirements file. Most of the repoze packages don't seem to be on PyPi, but there's an alternative PyPi index for them here. But I can't figure out how to tell pip to use that index together with a requirements file. For single packages, it's easy
pip install zopelib -i http://dist.repoze.org/zope2/2.10/simple/
I tried the following
pip install -r requirements.txt -i http://dist.repoze.org/zope2/2.10/simple/
or in my requirements.txt all kind or permutations of these:
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
or (because the documentation says "Note that all these options must be on a line of their own.")
--index http://dist.repoze.org/zope2/2.10/simple/
zopelib
So, what's the correct way of telling pip to use http://dist.repoze.org/zope2/2.10/simple/ as index?
发布评论
评论(2)
requirements.txt
:示例:
requirements.txt
:Example:
在包/项目名称之前添加额外的索引位置到需求文件中:
或者,您可以使用
-i
或--index-url
。请参阅:需求文件格式
Add an extra index location to the requirements file just before the package/project name:
Alternatively, you may use
-i
or--index-url <Base URL of the Python Package Index>
.Refer: requirements file format