Alo*_*Alo 16 python git proxy anaconda conda
我在Anaconda工作时遇到代理问题.
当我有以下环境变量时:
http_proxy: http://domain\username:password@corp.com:8080
https_proxy: https://domain\username:password@corp.com:8080
Run Code Online (Sandbox Code Playgroud)
要不就
http_proxy: http://server\username:password@corp.com:8080
Run Code Online (Sandbox Code Playgroud)
然后设置git工作.但是Anaconda没有用.我想跑
conda update conda
Run Code Online (Sandbox Code Playgroud)
我得到:
Could not connect to https://repo.continuum.io/pkgs....
Could not connect to https://repo.continuum.io/pkgs....
Run Code Online (Sandbox Code Playgroud)
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....
Run Code Online (Sandbox Code Playgroud)
我正在使用Windows 7.
toa*_*eez 35
您需要在Windows用户区域中创建.condarc文件:
C:\Users\<username>\
Run Code Online (Sandbox Code Playgroud)
该文件应包含:
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
Run Code Online (Sandbox Code Playgroud)
经过大量的试验和错误,我们终于在 .condarc 文件中使用以下语法(没有“http://”)(我们有两个这样的文件,一个在 Users 文件夹中,另一个在实际的 User 文件夹中) )。
proxy_servers:
http: proxyserver.org:portNumber
https: proxyserver.org:portNumber
Run Code Online (Sandbox Code Playgroud)
代理服务器必须对anaconda.org和 anaconda.com 进行例外处理。重要的!
归档时间: |
|
查看次数: |
61299 次 |
最近记录: |