最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

python - remove default conda channels - Stack Overflow

matteradmin7PV0评论

I have just re-installed my anaconda. Below is my ~/.condarc

channels:
  - 
  - 
  - 
custom_channels:
  conda-fe: 
  pytorch: 
show_channel_urls: true

However when I type

conda config --show channels I get the following

channels:
  - 
  - 
  - 
  - 
  - 

and conda config --show custom_channels still gives me the following:

custom_channels:
  pkgs/main: 
  pkgs/r: 
  conda-fe: 
  pytorch: 

How do I remove the repo.anaconda channels? As my conda is still trying to download packages from the default channels. I tried

conda config --remove channels

but got

CondaKeyError: 'channels': value '' not present in config

I have just re-installed my anaconda. Below is my ~/.condarc

channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
  conda-fe: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
show_channel_urls: true

However when I type

conda config --show channels I get the following

channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
  - https://repo.anaconda/pkgs/main
  - https://repo.anaconda/pkgs/r

and conda config --show custom_channels still gives me the following:

custom_channels:
  pkgs/main: https://repo.anaconda
  pkgs/r: https://repo.anaconda
  conda-fe: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

How do I remove the repo.anaconda channels? As my conda is still trying to download packages from the default channels. I tried

conda config --remove channels https://repo.anaconda/pkgs/main

but got

CondaKeyError: 'channels': value 'https://repo.anaconda/pkgs/main' not present in config
Share Improve this question asked Nov 16, 2024 at 5:05 给你机会你不中用啊给你机会你不中用啊 234 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

managed to solve this in the end. For anyone having the same issue, run

find / -name ".condarc" 2>/dev/null

and see how many other .condarc files exist in your machine.

I ended up deleting the other .condarc files.

Post a comment

comment list (0)

  1. No comments so far