anconda添加镜像源

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

anconda添加镜像源

.helloWorld   2020-03-18 我要评论
# 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~

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们