1、使用conda创建环境遇到如下问题:
2、备份原来的配置文件
mv .condarc .condarc.backup
3、创建新的配置文件
vim .condarc
##输入:
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
show_channel_urls: true
##然后保存
4、测试
[root@linuxprobe ~]# conda search trinity ## 没有之前的报错
Loading channels: done
PackagesNotFoundError: The following packages are not available from current channels:
- trinity
Current channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarch
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/linux-64
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/noarch
参考:https://blog.csdn.net/cxm4399/article/details/100530896