使用代理运行conda [英] Running conda with proxy

查看:997
本文介绍了使用代理运行conda的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows上使用Anaconda 2.7,并且我的互联网连接使用代理.

I'm using Anaconda 2.7 on windows, and my internet connection uses a proxy.

以前,当使用python 2.7(不是Anaconda)时,我安装了这样的软件包:

Previously, when using python 2.7 (Not Anaconda), I installed package like this:

pip install {packagename} --proxy proxy-us.bla.com:123

是否可以通过代理参数运行conda?在conda help中没有看到它.

Is there a way to run conda with proxy argument? didn't see it in conda help.

谢谢

推荐答案

您可以通过将conda添加到.condarc中来配置具有conda的代理,例如

You can configure a proxy with conda by adding it to the .condarc, like

proxy_servers:
    http: http://user:pass@corp.com:8080
    https: https://user:pass@corp.com:8080

或设置HTTP_PROXYHTTPS_PROXY环境变量.请注意,根据您的情况,您需要将该方案添加到代理网址中,例如 https://proxy-us.bla.com:123 .

or set the HTTP_PROXY and HTTPS_PROXY environment variables. Note that in your case you need to add the scheme to the proxy url, like https://proxy-us.bla.com:123.

请参见 http://conda.pydata. org/docs/config.html#configure-conda-for-use-behind-a-proxy-server .

这篇关于使用代理运行conda的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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