带有替代索引的 pip requirements.txt [英] pip requirements.txt with alternative index

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

问题描述

我想将 repoze 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

那么,告诉 pip 使用 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天全站免登陆