conda 设置清华镜像源_conda设置国内镜像源

本文介绍了如何为conda设置清华镜像源,以加快conda包的下载速度。内容包括手动创建.condarc文件并添加清华源的详细步骤,以及通过命令行添加源的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

前言

与 pip设置pypi源 不同,conda需要设置的源是anaconda的源,annaconda的国内镜像目前好像只有清华。科大那个现在直接重定向转到清华,已经不能用了。

设置

与pip设置pypi源类似,conda可以在windows用户目录下创建一个.condarc文件,然后写入以下内容即可。ssl_verify: true

channels:

- defaults

show_channel_urls: true

channel_alias: https://mirrors.tuna.tsinghua.edu.cn/anaconda

default_channels:

- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main

- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free

- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r

- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro

- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2

custom_channels:

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

msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

如果无法创建这个文件,可以使用以下命令创建。conda config --set show_channel_urls yes

如果命令行一个个添加源也是可以的。conda config --add channels 源地址

参考

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值