WSL2 (Ubuntu 20.04) 上的 Miniconda 失败并出现 CondaHTTPError: HTTP 000 CONNECTION FAILED

muu*_*uuh 13 ubuntu connectivity anaconda miniconda wsl-2

我使用的是 Ubuntu 的 WSL2,并且想要安装 Miniconda 版本 4.9.2。安装过程很顺利,但我现在无法连接到 anaconda 来安装软件包。还有简单的命令,例如conda update conda失败

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'
Run Code Online (Sandbox Code Playgroud)

您可以找到针对该主题的大量解决方案——针对纯 Windows!像这里一样,但我找不到 Ubuntu 或 WSL2 中的 Ubuntu 的解决方案。

正如上面的解决方案所建议的那样,对我来说,在 windows-dll 中移动并没有真正的意义。无论如何,我尝试并将类似的声音文件复制到类似的声音文件夹,但这并没有达到目的。

甚至连加密的“技巧”也不起作用。看起来确实是一个很严重的问题。有什么建议么?谢谢。

Ars*_*eny 37

我也遇到了同样的问题,尽管是在 WSL 1 上,而不是 2。我找到的解决方案是在安装 conda 后退出 Ubuntu 并关闭 WSL,来自cmd.exe

> wsl --shutdown
Run Code Online (Sandbox Code Playgroud)

重启Ubuntu后,问题就消失了。它不需要先安装旧版本的 conda。

  • 在 Debian 上的 WSL2 上点击此按钮。`wsl -- shutdown` 修复了它。 (2认同)

小智 9

您可以根据此尝试三件事:https ://github.com/conda/conda/issues/9948

  1. 安装旧版本 (4.7.12) 的 conda / miniconda请参阅此处
  2. 更改 miniconda 安装的文件和目录权限 ( chmod -R 777 ~/.miniconda3)请参阅此处
  3. 重启wsl( wsl --shutdown)看这里

  • 重新启动 WSL 为我解决了这个问题。 (5认同)

小智 3

根据此链接: https ://github.com/conda/conda/issues/9948#issuecomment-771901234

请尝试手动安装4.7.12.1以下版本:

wget https://repo.anaconda.com/miniconda/Miniconda3-4.7.12.1-Linux-x86_64.sh
Run Code Online (Sandbox Code Playgroud)