Anaconda国内镜像

<一>添加Anaconda Python免费仓库

TUNA提供了Anaconda仓库的镜像,运行如下命令:

#添加目前可用的镜像源 

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/

(以上两条为Anaconda官方镜像库)

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/

(Anaconda第三方库 Conda Forge的镜像)

# for linux

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/

# for legacy win-64

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/peterjc123/

(以上两条是Pytorch的Anaconda第三方镜像)

#删除镜像源

conda config --remove channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

#设置搜索时显示通道地址 

conda config --set show_channel_urls yes

#确认镜像源是否安装成功

conda config --show

<二>使用

conda install {PKG_NAME}            //PKG_NAME :包的名字

 <三>恢复默认配置

conda config --remove-key channels

 <四>获取更多信息

conda info

参考资料:

conda清华镜像(TUNA)使用指南 - leizhao - 博客园

为Conda添加清华软件源 - 知乎

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值