问题描述
我在工作中使用代理背后的 Anaconda 时遇到问题.
I'm having trouble working with Anaconda behind a proxy at work.
当我有以下环境变量时:
When I have have the following environment variables:
http_proxy: http://domainusername:password@corp.com:8080
https_proxy: https://domainusername:password@corp.com:8080
或者只是
http_proxy: http://serverusername:password@corp.com:8080
设置然后 git 工作.但是 Anaconda 不起作用.我正在尝试运行
set up then git works. But Anaconda does not work.I'm trying to run
conda update conda
我得到:
Could not connect to https://repo.continuum.io/pkgs....
Could not connect to https://repo.continuum.io/pkgs....
Anaconda 不支持 http 吗?并且需要一个 https 代理?因为我认为我的公司可能没有 https 代理服务器设置(我只看到他们使用 http).或者有时我会收到错误:
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 "cAnaconda2", 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....
我使用的是 Windows 7.
I'm using Windows 7.
推荐答案
你需要在你的 Windows 用户区创建一个 .condarc 文件:
you need to create a .condarc file in you Windows user area:
C:Users<username>
文件应包含:
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)后面工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!