我在工作中使用代理背后的 Anaconda 时遇到问题。
当我有以下环境变量时:
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 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)。 或者有时我收到错误:
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....
我使用的是 Windows 7。
最佳答案
您需要在您的 Windows 用户区创建一个 .condarc 文件:
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: https://proxy.yourorg.org:port
ssl_verify: False
关于python - 如何让 Anaconda 在 HTTP 代理(不是 https)后面工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36729023/