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
  • 相关阅读:
    PAT乙级题库“傻瓜”题解之跟奥巴马一起编程
    PAT乙级题库“傻瓜”题解之划拳
    PAT乙级题库“傻瓜”题解之数素数
    PAT乙级题库“傻瓜”题解之编程团体赛
    PAT乙级题库“傻瓜”题解之判断题
    PAT乙级题库“傻瓜”题解之输出PATest
    有始有终,后会无期。
    今日德语大学习
    【day
    [day 3] Deutsch Studie
  • 原文地址:https://www.cnblogs.com/winslam/p/13532213.html
Copyright © 2011-2022 走看看