I'm having trouble working with Anaconda behind a proxy at work.
When I have have the following environment variables:
http_proxy: http://domain\username:[email protected]:8080
https_proxy: https://domain\username:[email protected]:8080
or just
http_proxy: http://server\username:[email protected]:8080
set up then git works. But Anaconda does not work. I'm trying to run
conda update conda
and I get:
Could not connect to https://repo.continuum.io/pkgs....
Could not connect to https://repo.continuum.io/pkgs....
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 "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....
I'm using Windows 7.
To use a proxy in Python, first import the requests package. Next create a proxies dictionary that defines the HTTP and HTTPS connections. This variable should be a dictionary that maps a protocol to the proxy URL. Additionally, make a url variable set to the webpage you're scraping from.
Another way to pass a proxy address to Python is to set the http_proxy and https_proxy environment variables. If you set environment variables, you don't need to define any proxies in your code. Just be aware that proxy settings passed through code now override settings set via environment variables.
you need to create a .condarc file in you Windows user area:
C:\Users\<username>\
The file should contain:
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With