conda-forge使用
原conda源:查看.condarc
文件
ssl_verify: true
show_channel_urls: true
channels:
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
- http://mirrors.ustc.edu.cn/anaconda/cloud/menpo/
- http://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/
- http://mirrors.ustc.edu.cn/anaconda/cloud/msys2/
- http://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
- http://mirrors.ustc.edu.cn/anaconda/pkgs/free/
- http://mirrors.ustc.edu.cn/anaconda/pkgs/main/
删除源
问题
只删除channels后,添加conda-forge出错:
File "D:\tools\Anaconda3\lib\site-packages\conda\cli\main_config.py", line 321, in execute_config
raise CouldntParseError("key %r should be a list, not %s." % (key, bad))
conda.exceptions.CouldntParseError: key 'channels' should be a list, not NoneType.
解决
删除整个.condarc
文件
添加conda-forge
conda config --add channels conda-forge
conda config --set channel_priority strict
conda install <package-name>