首页 > 其他 > 详细

anconda添加镜像源

时间:2020-03-18 20:40:18      阅读:230      评论:0      收藏:0      [点我收藏+]

anaconda 安装镜像源


    在使用安装 conda 安装某些包会出现慢或安装失败问题,最有效方法是修改镜
像源为国内镜像源。
    之前都选用清华镜像源,但是2019年后已停止服务。推荐选用中科大镜像源。

先查看已经安装过的镜像源,cmd窗口执行命令: conda config --show

查看配置项 channels ,如果显示带有 tsinghua ,则说明已安装过清华镜像。

channels:
https://mirrors.tuna.tsinghua.edu.cn/tensorflow/linux/cpu/
https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/

  

  

下一步,使用 conda config --remove channels url地址删除清华镜像,如下命令删除第一个。然后,依次删除所有镜像源

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

  

添加目前可用的中科大镜像源:

conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/

  

并设置搜索时显示通道地址:

conda config --set show_channel_urls yes

  

确认是否安装镜像源成功,执行 conda config --show ,找到 channels 值为如下:

channels:

https://mirrors.ustc.edu.cn/anaconda/pkgs/free/ 

defaults

  

Done~

anconda添加镜像源

原文:https://www.cnblogs.com/codeofmine/p/12519875.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!