4

I need to configure a proxy in order to upgrade my Python environment in Anaconda. I specified the HTTP_PROXY environment variable:

set HTTP_PROXY=myproxy:8080

and modified the .condarc file in C:\Users\I328807:

proxy_servers:
    http: http://myproxy:8080

but conda still struggles with the connection:

C:\Users\I328807>conda install python=3.5
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata: Could not connect to https://repo.continuum.io/pkgs/free/win-64/
Could not connect to https://repo.continuum.io/pkgs/free/noarch/
Could not connect to https://repo.continuum.io/pkgs/pro/win-64/
Could not connect to https://repo.continuum.io/pkgs/pro/noarch/
Mark Morrisson
  • 2,543
  • 4
  • 19
  • 25
  • Other example of same question, maybe it will be usefull: http://stackoverflow.com/questions/31099279/running-conda-with-proxy – Destrif May 25 '16 at 12:31
  • I've read them but as I explained in my post, the definition of an environment variable and the configuration of the condarc file didn't solve the issue. – Mark Morrisson May 25 '16 at 12:35
  • If you want to use command line, please check here: https://stackoverflow.com/questions/31099279/running-conda-with-proxy – su79eu7k Jan 25 '18 at 01:37

2 Answers2

4

Try with an HTTPS proxy, not HTTP.

So the configuration should be,

set HTTPS_PROXY=myproxy:8080

proxy_servers:
    https: https://myproxy:8080

For more info, see here: http://conda.pydata.org/docs/config.html#configure-conda-for-use-behind-a-proxy-server-proxy-servers

mavroprovato
  • 8,023
  • 5
  • 37
  • 52
  • This worked... I supposed that the proxy was a HTTP one because the .pac configuration file just defines it with "PROXY myproxy:8080" but I was wrong. It seems the navigator is able to find out which type of proxy it is. – Mark Morrisson May 25 '16 at 15:31
1

Please can you retry this:

export HTTP_PROXY rather than set.

sudo -E bash -c 'echo $HTTP_PROXY' for making sure you export your variable.

Otherwise note that in your .condarc you cannot have tab between http: and declaration, only space.

Tshilidzi Mudau
  • 7,373
  • 6
  • 36
  • 49
Destrif
  • 2,104
  • 1
  • 14
  • 22