带有其他索引的pip requirements.txt [英] pip requirements.txt with alternative index

查看:97
本文介绍了带有其他索引的pip requirements.txt的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将Reoze Zope2安装的所有要求放在pip 需求文件.大多数repoze软件包似乎都不在PyPi上,但是它们有一个替代的PyPi索引这里.但是我不知道如何告诉pip与需求文件一起使用该索引.对于单个包裹,这很容易

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/

我尝试了以下

pip install -r requirements.txt -i http://dist.repoze.org/zope2/2.10/simple/

或在我的requirements.txt文件中,这些内容的所有种类或排列方式:

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

那么,告诉点子使用 http://dist.repoze的正确方法是什么. org/zope2/2.10/simple/作为索引?

So, what's the correct way of telling pip to use http://dist.repoze.org/zope2/2.10/simple/ as index?

推荐答案

requirements.txt:

-i http://dist.repoze.org/zope2/2.10/simple
zopelib

示例:

$ pip install -r requirements.txt
...
Successfully installed zopelib

这篇关于带有其他索引的pip requirements.txt的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆