zoukankan      html  css  js  c++  java
  • 有关于Anaconda换源

    一、Anaconda切换官方源(推荐使用官方源+梯子)

     1 # conda环境还源。宁愿用梯子使用国外官方源,也不用国内源
     2 # 查看anaconda配置镜像
     3 > conda config --show channels
     4 channels:
     5   - https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
     6   - anaconda-fusion
     7   - defaults
     8 # 删除所有源
     9 > conda config --remove-key channels
    10 > conda config --show channels
    11 channels:
    12   - defaults
    13 # 更新所有包
    14 > conda update --all
    15 > ...
    16 
    17 
    18 # 其实,.condarc 这个文件在 C:UsersAdministrator
    19 # 或者直接更改 ~/.condarc
    20 > vim ~/.condarc
    21 channels:
    22   - defaults

     二、切换国内源

    Conda配置国内镜像源

    1 # 换回默认源(清除所有用户添加的镜像源路径,只保留默认的路径)
    2 conda config --remove-key channels
    3 vim ~/.condarc

    镜像源

    # 中科大镜像源
    conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
    conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
    conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
    conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/msys2/
    conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/
    conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/menpo/
    conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/
    
    # 阿里镜像源
    conda config --add channels https://mirrors.aliyun.com/pypi/simple/
    
    # 豆瓣的python的源
    conda config --add channels http://pypi.douban.com/simple/ 
    
    # 显示检索路径,每次安装包时会将包源路径显示出来
    conda config --set show_channel_urls yes
    
    conda config --set always_yes True
    
    # 显示所有镜像通道路径命令
    conda config --show channels

    从国内镜像源下载包

    # 更换后面的源路径和需要安装的包名即可
    pip install -U pandas -i https://pypi.tuna.tsinghua.edu.cn/simple
    
    pip install -U networkx python-louvain tensorflow-gpu==1.12 -i https://pypi.tuna.tsinghua.edu.cn/simple

    reference:

    https://blog.csdn.net/taoyu94/article/details/108150892

    CV&DL
  • 相关阅读:
    免费的视频、音频转文本
    Errors are values
    Codebase Refactoring (with help from Go)
    Golang中的坑二
    Cleaner, more elegant, and wrong(msdn blog)
    Cleaner, more elegant, and wrong(翻译)
    Cleaner, more elegant, and harder to recognize(翻译)
    vue控制父子组件渲染顺序
    computed 和 watch 组合使用,监听数据全局数据状态
    webstorm破解方法
  • 原文地址:https://www.cnblogs.com/winslam/p/13532213.html
Copyright © 2011-2022 走看看