如何使Anaconda在HTTP代理(不是https)后面工作? [英] How to make Anaconda work behind HTTP proxy (not https)?

查看:729
本文介绍了如何使Anaconda在HTTP代理(不是https)后面工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



当我有以下环境变量时:

  http_proxy:http:// domain\username:password@corp.com:8080 
https_proxy:https:// domain\username:password @ corp.com:8080

或者只是

  http_proxy:http:// server\username:password@corp.com:8080 

设置然后git工作。但是Anaconda不起作用。
我试图运行

  conda更新conda 

我得到:

 无法连接到https:无法连接到https://repo.continuum.io/pkgs .... 

Anaconda不适用于http吗?并需要一个https代理?因为我认为我的公司可能没有https代理服务器设置(我只看到他们使用http)。
或有时会出现错误:

 文件c\Anconda2\,第340行,等待
waiter.acquire()
KeyboardInterrupt
无法连接到https://repo.continuum.io/pkgs ....
无法连接到https:// repo .continuum.io / pkgs ....

我使用Windows 7。

解决方案

您需要在Windows用户区创建一个 .condarc 文件:

  C:\ Users \< username> \ 

文件应该包含:

 频道:
- 预设值

#在显示要下载的内容时显示频道网址,在conda列表中显示
#。默认值是False。
show_channel_urls:True
allow_other_channels:True

proxy_servers:
http:http://proxy.yourorg.org:port
https:http:/ /proxy.yourorg.org:port


ssl_verify:False


I'm having trouble working with Anaconda behind a proxy at work.

When I have have the following environment variables:

http_proxy: http://domain\username:password@corp.com:8080
https_proxy: https://domain\username:password@corp.com:8080

or just

http_proxy: http://server\username:password@corp.com:8080

set up then git works. But Anaconda does not work. I'm trying to run

conda update conda

and I get:

Could not connect to https://repo.continuum.io/pkgs....
Could not connect to https://repo.continuum.io/pkgs....

Does Anaconda not work with http? and requires an https proxy? Because I'm thinking my company may not have an https proxy server setup (I've only seen them use http). or sometimes I get the error:

File "c\Anaconda2\", line 340, in wait
    waiter.acquire()
KeyboardInterrupt
Could not connect to https://repo.continuum.io/pkgs....
Could not connect to https://repo.continuum.io/pkgs....

I'm using Windows 7.

解决方案

you need to create a .condarc file in you Windows user area:

C:\Users\<username>\

The file should contain:

channels:
- defaults

# Show channel URLs when displaying what is going to be downloaded and
# in 'conda list'. The default is False.
show_channel_urls: True
allow_other_channels: True

proxy_servers:
    http: http://proxy.yourorg.org:port
    https: http://proxy.yourorg.org:port


ssl_verify: False

这篇关于如何使Anaconda在HTTP代理(不是https)后面工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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