深度学习环境搭建过程中的换源问题(删除,添加、查看镜像源操作)(Linux系统)

在Linux的终端中我们经常使用Conda 来安装新的库,有时我们也会添加Conda的源,久而久之当我们再用Conda install 安装新的软件时就会报出以下的错误:(解决方案见下述 四)

这里我将有关镜像源操作的指令做了如下整理:

一、如何查看现有的镜像源:

conda config --show channels

二、如何增加镜像源:

conda config --add channels https://pypi.mirrors.ustc.edu.cn/simple/

三、如何删除镜像源:

conda config --remove channels  https://pypi.mirrors.ustc.edu.cn/simple/
​conda config --remove channels  https://mirrors.tuna.tsinghua.edu.cn/tensorflow/linux/cpu/​


( https://pypi.mirrors.ustc.edu.cn/simple/ 为 中国科技大学镜像源)

https://mirrors.tuna.tsinghua.edu.cn/tensorflow/linux/cpu/ 为 清华大学镜像源)

四、如何解决404问题(如何恢复系统默认镜像源):

遇到上面的404问题,可以:

换回默认源,继续使用conda,操作命令为:

conda config --remove-key channels

此时,我们再次执行conda install -xxx,就会使用默认的Conda源来下载。

Example:

猜你喜欢

转载自blog.csdn.net/m0_54111890/article/details/125281477
今日推荐