在全新的Anaconda环境中安装conda时,“收集软件包元数据:失败”,并显示UnavailableInvalidChannel错误

时间:2019-05-23 04:38:34

标签: python anaconda conda

就在我成功地在Windows中安装Anaconda(使用here)之后,我尝试使用conda命令安装软件包。然后,出现以下UnavailableInvalidChannel错误:

C:\Users\user>conda install numpy
WARNING: The conda.compat module is deprecated and will be removed in a future release.
Collecting package metadata: failed

UnavailableInvalidChannel: The channel is not accessible or is invalid.
  channel name: pkgs/msys2/repo.anaconda.com/pkgs
  channel url: https://repo.anaconda.com/pkgs/msys2/repo.anaconda.com/pkgs
  error code: 404

似乎conda使用了错误的频道网址,但是在我的配置中没有引用https://repo.anaconda.com/pkgs/msys2/repo.anaconda.com/pkgs

C:\Users\user>conda config --show channels
channels:
  - https://repo.anaconda.com/pkgs/
  - https://repo.anaconda.com/pkgs/main/win-64/
  - defaults

您知道如何解决此问题吗?

这是我的环境:

C:\Users\user>conda info

     active environment : None
       user config file : C:\Users\user\.condarc
 populated config files : C:\Users\user\.condarc
          conda version : 4.6.11
    conda-build version : 3.17.8
         python version : 3.7.3.final.0
       base environment : C:\ProgramData\Anaconda3  (read only)
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/msys2/repo.anaconda.com/pkgs/win-64
                          https://repo.anaconda.com/pkgs/msys2/repo.anaconda.com/pkgs/noarch
                          https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
          package cache : C:\ProgramData\Anaconda3\pkgs
                          C:\Users\user\.conda\pkgs
                          C:\Users\user\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\user\.conda\envs
                          C:\ProgramData\Anaconda3\envs
                          C:\Users\user\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.6.11 requests/2.21.0 CPython/3.7.3 Windows/10 Windows/10.0.17763
          administrator : False
             netrc file : None
           offline mode : False

1 个答案:

答案 0 :(得分:0)

这可能是OpenSSL问题。如果您使用的是Windows 10,则需要添加以下路径,它应该可以解决该问题:

您的conda路径 \脚本

您的conda路径 \ Anaconda3

您的conda路径 \ Library \ bin