我如何在pip.conf中声明一个以上的extra-index-url [英] How do i declare more than one extra-index-url in pip.conf

查看:503
本文介绍了我如何在pip.conf中声明一个以上的extra-index-url的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在哪里设置pip.conf?

Where would I set this in pip.conf?

我想在pip.conf中添加两个(2)extra-index-url,但是在对文档进行一些研究之后,我没有找到解决方法.

I want to add two(2) extra-index-urls in pip.conf, but I did not find a solution how to do this after some research in the docs.

推荐答案

尽管

诸如--find-links之类的附加选项可以写在多行上:

Appending options like --find-links can be written on multiple lines:

[global]
find-links =
    http://download.example.com

[install]
find-links =
    http://mirror1.example.com
    http://mirror2.example.com

所以我相信您也许可以对extra-index-url做同样的事情.当我要测试的索引出现问题时,我可以确认在命令行中两次传递参数与在多行中将两个索引分开的效果相同.

So I believe you may be able to do the same for extra-index-url. While I am having issues with the indices I'm using to test, I can confirm that passing the argument twice at the command line has the same effect as separating the two indices on multiple lines like this example does.

我可以确认这确实适用于extra-index-url.

edit: I can confirm that this does indeed work for extra-index-url.

这篇关于我如何在pip.conf中声明一个以上的extra-index-url的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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