0
votes

I am configuring the anaconda on ubuntu 16.04. When I use conda update --all, there is a error shown as following

Fetching package metadata ... CondaHTTPError: HTTP 000 CONNECTION FAILED for url https://repo.continuum.io/pkgs/main/linux-64/repodata.json.bz2 Elapsed: -

An HTTP error occurred when trying to retrieve this URL. HTTP errors are often intermittent, and a simple retry will get you on your way. ProxyError(MaxRetryError("HTTPSConnectionPool(host='repo.continuum.io', port=443): Max retries exceeded with url: /pkgs/main/linux-64/repodata.json.bz2 (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError(': Failed to establish a new connection: [Errno -3] Temporary >failure in name resolution',)))",),)

Maybe a new proxy setting is necessary on anaconda,however,the ubuntu 16.04 has setted proxy.

I see online that I should add a proxy into a .condarc file that contains the proxy address. Unfortunately,

  1. I can not locate the .condarc file on ubuntu 16.04
  2. Or there is another way to solve the error?

Any help appreciated Thanks!

1

1 Answers

1
votes

create a new file ~/.condarc in your home directory

$ nano ~/.condarc

Add these lines below to .condarc file

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

If your password contains special characters, you need to escape them as described in Percent-encoding reserved characters, on Wikipedia. Sometimes conda commands don't work after these additions due to some bug posted in their repo. If that so removes the .condarc file and try using these commands

$ export HTTP_PROXY=http://user:[email protected]:8080
$ export HTTPS_PROXY=https: https://user:[email protected]:8080

This method sometimes doesn't work but still worth a shot. Hope this helps. For any queries reach out in the comment section.