Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Miniconda on WSL2 (Ubuntu 20.04) fails with CondaHTTPError: HTTP 000 CONNECTION FAILED

I am on a WSL2 with Ubuntu and wanted to install Miniconda version 4.9.2. The installation went effortlessly, but I can now not connect to anaconda to install packages. Also simple commands like conda update conda fail with

Collecting package metadata (current_repodata.json): failed

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/linux-64/current_repodata.json>
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.

If your current network has https://www.anaconda.com blocked, please file
a support request with your network engineering team.

'https://repo.anaconda.com/pkgs/main/linux-64'

You find plenty of solutions for this topic -- for pure Windows! Like here, but I could not find a solution for Ubuntu, or an Ubuntu in a WSL2.

It does not really make sense to me moving around windows-dlls, as the upper solution suggests. I tried anyway and copied similar sounding files to similar sounding folders, but that did not do the trick.

Even the 'trick' of turning of encryption did not work. Seems to be a really severe problem. Any suggestions? Thanks.

like image 646
muuh Avatar asked Dec 13 '22 07:12

muuh


1 Answers

I had the same problem, although on WSL 1, not 2. The solution I found was exiting Ubuntu and shutting down WSL after installing conda, from cmd.exe:

> wsl --shutdown

After restarting Ubuntu, the problem went away. It didn't require installing an older version of conda first.

like image 141
Arseny Avatar answered Dec 15 '22 21:12

Arseny