(base) PS C:\Users\Administrator> conda config --remove channels conda-forge (base) PS C:\Users\Administrator> conda install -c anaconda scikit-learn Collecting package metadata (current_repodata.json): failed UnavailableInvalidChannel: HTTP 404 NOT FOUND for channel conda-forg <https://conda.anaconda.org/conda-forg> The channel is not accessible or is invalid. 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.
时间: 2024-02-18 12:04:02 浏览: 613
看起来问题仍然存在。您可以尝试清空 conda 的缓存并重新设置配置:
```
conda clean --all
conda config --set channel_priority strict
conda config --add channels defaults
conda config --add channels conda-forge
conda config --add channels anaconda
```
然后再运行以下命令来安装 scikit-learn:
```
conda install scikit-learn
```
这应该会从 defaults、conda-forge 或 anaconda 频道中的一个安装 scikit-learn。如果您仍然遇到问题,请让我知道。
相关问题
(base) C:\Users\Administrator>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ Warning: 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/' already in 'channels' list, moving to the top
这个命令的输出结果说明你已经将清华大学的 Anaconda 镜像源添加到了你的 Anaconda 配置文件中,并且将其设为了首选镜像源。
这个操作可以加速你在使用 Anaconda 安装、更新、卸载软件包时的下载速度。你可以继续使用以下命令来添加其他镜像源,以便在访问清华大学的镜像源时出现问题时可以使用其他可用的镜像源:
```
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
```
这些镜像源分别对应 Anaconda 的免费软件包、R 语言包和 conda-forge 社区维护的软件包。在添加完这些镜像源之后,你可以使用 `conda update` 或 `conda install` 命令来更新或安装软件包,Anaconda 会自动从你所添加的镜像源中选择最快的一个进行下载。
(base) C:\Users\86183>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/conda config --set show_channel_urls yesconda install -c conda-forge opencv usage: conda-script.py config [-h] [--json] [-v] [-q] [--system | --env | --file FILE] [--show [SHOW [SHOW ...]] | --show-sources | --validate | --describe [DESCRIBE [DESCRIBE ...]] | --write-default] [--get [KEY [KEY ...]] | --append KEY VALUE | --prepend KEY VALUE | --set KEY VALUE | --remove KEY VALUE | --remove-key KEY | --stdin] conda-script.py config: error: argument --set: not allowed with argument --prepend/--add
这个错误是因为你在输入命令时有误。正确的命令应该是:
```
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
conda install -c conda-forge opencv
```
你可以将这个命令复制粘贴到命令行中执行。
阅读全文
相关推荐

















