使用代理运行 conda [英] Running conda with proxy
问题描述
我在 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
来配置代理,例如
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_PROXY
和 HTTPS_PROXY
环境变量.请注意,在您的情况下,您需要将方案添加到代理 url,例如 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屋!