Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running conda with proxy

I'm using Anaconda 2.7 on windows, and my internet connection uses a proxy.

Previously, when using python 2.7 (Not Anaconda), I installed package like this:

pip install {packagename} --proxy proxy-us.bla.com:123

Is there a way to run conda with proxy argument? didn't see it in conda help.

Thanks

like image 805
omerbp Avatar asked Jun 28 '15 11:06

omerbp


People also ask

What is Condarc?

condarc , is an optional runtime configuration file that allows advanced users to configure various aspects of conda, such as which channels it searches for packages, proxy settings, and environment directories.

Can I install Anaconda in Windows XP?

Anaconda 2.3. 0 is the last version of Python 3-based Anaconda to support Windows XP. Anaconda 2.4 and later have a version of Python 3 built with Visual Studio 2015, which by default does not support Windows XP. You can install Anaconda 2.3.


2 Answers

You can configure a proxy with conda by adding it to the .condarc, like

proxy_servers:
    http: http://user:[email protected]:8080
    https: https://user:[email protected]:8080

or set the HTTP_PROXY and HTTPS_PROXY environment variables. Note that in your case you need to add the scheme to the proxy url, like https://proxy-us.bla.com:123.

See http://conda.pydata.org/docs/config.html#configure-conda-for-use-behind-a-proxy-server.

like image 91
asmeurer Avatar answered Oct 01 '22 18:10

asmeurer


Or you can use the command line below from version 4.4.x.

conda config --set proxy_servers.http http://id:pw@address:port
conda config --set proxy_servers.https https://id:pw@address:port
like image 21
su79eu7k Avatar answered Oct 01 '22 19:10

su79eu7k