Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UnavailableInvalidChannel: The channel is not accessible or is invalid. error code: 403, conda-forge not working

my conda-forge is not working and displaying the following error even while creating a new enviornment:

(base) C:\Users\1836849\Documents\GitHub_Repository\ChemOS-master>conda create -n py36 python=3.6
Collecting package metadata (current_repodata.json): failed

UnavailableInvalidChannel: The channel is not accessible or is invalid.
  channel name: conda-forge
  channel url: https://conda.anaconda.org/conda-forge
  error code: 403

You will need to adjust your conda configuration to proceed.
Use `conda config --show channels` to view your configuration's current state,
and use `conda config --show-sources` to view config file locations.

my conda info shows this information:

    (base) C:\Users\1836849\Documents\GitHub_Repository\ChemOS-master>conda info

     active environment : base
    active env location : C:\ProgramData\Anaconda3
            shell level : 1
       user config file : C:\Users\1836849\.condarc
 populated config files : C:\Users\1836849\.condarc
          conda version : 4.9.2
    conda-build version : 3.20.5
         python version : 3.8.5.final.0
       virtual packages : __win=0=0
                          __archspec=1=x86_64
       base environment : C:\ProgramData\Anaconda3  (writable)
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://conda.anaconda.org/anaconda-fusion/win-64
                          https://conda.anaconda.org/anaconda-fusion/noarch
                          https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\ProgramData\Anaconda3\pkgs
                          C:\Users\1836849\.conda\pkgs
                          C:\Users\1836849\AppData\Local\conda\conda\pkgs
       envs directories : C:\ProgramData\Anaconda3\envs
                          C:\Users\1836849\.conda\envs
                          C:\Users\1836849\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.9.2 requests/2.24.0 CPython/3.8.5 Windows/10 Windows/10.0.18362
          administrator : True
             netrc file : None
           offline mode : False

what is the possible solution?

like image 743
Prathmesh Ambure Avatar asked Nov 14 '22 23:11

Prathmesh Ambure


1 Answers

As per documentation here there are a few possible reasons for receiving this error:

  • The user has misconfigured their channels in their configuration (for example, the secure location where the token is stored was accidentally deleted (most common)

  • A firewall or other security device or system is preventing user access (second most common)

  • They are blocking their access because of a potential terms of service violation (third most common)

Solution

First, run the following to undo your configuration of Commercial Edition:

conda config --remove-key default_channels

Next, install or upgrade the conda-token tool:

conda install --freeze-installed conda-token

Lastly, re-apply the token and configuration settings:

# Replace <TOKEN> with your token
conda token set <TOKEN>
like image 173
Leonardo Papais Avatar answered Dec 25 '22 14:12

Leonardo Papais