gpt4 book ai didi

python - UnavailableInvalidChannel : The channel is not accessible or is invalid. 错误代码 : 403, conda-forge 不工作

转载 作者:行者123 更新时间:2023-12-04 11:44:08 33 4
gpt4 key购买 nike

即使在创建新环境时,我的 conda-forge 也无法正常工作并显示以下错误:

(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.
我的 conda info显示此信息:
    (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
可能的解决方案是什么?

最佳答案

根据文档 here收到此错误有几个可能的原因:

  • 用户在他们的配置中错误地配置了他们的 channel (例如,存储 token 的安全位置被意外删除(最常见)
  • 防火墙或其他安全设备或系统阻止用户访问(第二常见)
  • 由于潜在的服务条款违规(第三常见),他们阻止了他们的访问

  • 解决方案
    首先,运行以下命令来撤消您对商业版的配置: conda config --remove-key default_channels接下来,安装或升级 conda-token 工具: conda install --freeze-installed conda-token最后,重新应用 token 和配置设置:
    # Replace <TOKEN> with your token
    conda token set <TOKEN>

    关于python - UnavailableInvalidChannel : The channel is not accessible or is invalid. 错误代码 : 403, conda-forge 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66689887/

    33 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com