zoukankan      html  css  js  c++  java
  • 提高anconda下载速度

    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
    

      

    更新

    经过一段时间的使用,发现中科大镜像源有些库也是没有的 ┭┮﹏┭┮ ,发现豆瓣源倒是真的好用。

    介绍一下豆瓣源的配置:

    1. 在C:UsersAdministratorAppDataRoaming目录下新建文件夹pip;
    1. 在pip文件夹下新建pip.ini文件,然后在pip.ini 里输入

                [global]
                timeout = 6000
                index-url =http://pypi.douban.com/simple
                trusted-host = pypi.douban.com

    亲测有效,无论是把anconda下载到D盘还是C盘都可以。有问题欢迎留言。

     

    Done~

  • 相关阅读:
    JS判断字符串是否为空或是否全为空格
    分页-jquery.page.js插件在使用时重复触发“上一页”和“下一页”操作
    JS IE 打开本地exe程序
    bootstrap中的模态框(modal,弹出层)
    attr()、prop()、css() 的区别
    java-ActiveMQ
    java-webSocket
    java-普通类文件@Autowired自动注入为null
    HTML5<canvas>标签:使用canvas元素在网页上绘制四分之一圆(3)
    HTML5<canvas>标签:使用canvas元素在网页上绘制渐变和图像(2)
  • 原文地址:https://www.cnblogs.com/codeofmine/p/12519875.html
Copyright © 2011-2022 走看看