Windows CentOS Linux anaconda的国内镜像源更换

Windows

# 以命令指定源安装
# 清华:
pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple
# 中国科学技术大学
pip install numpy -i https://pypi.mirrors.ustc.edu.cn/simple
# 豆瓣
pip install numpy -i https://pypi.douban.com/simple
# 中科大源
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 --set show_channel_urls yes

CentOS6/7

CentOS更换国内阿里下载源

# 备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
# 下载阿里源包
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
# 功能:如果在yum中找不到的软件, 会自动到eole中找, 再下载
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
# 清空yum缓存
yum clean all
# 更新源
yum makecache
# 安装软件扩展源
yum install -y epel-release

Linux

# 配置文件写在~/.condarc中 
# vim ~/.condarc
channels:
  - https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
  - https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - defaults
show_channel_urls: true

换回默认conda源

conda config --remove-key channels

你可能感兴趣的:(Windows CentOS Linux anaconda的国内镜像源更换)