conda查看源和添加本地源

本文介绍了如何使用condaconfig命令来管理conda环境的渠道源,包括添加、删除和查看FTP及HTTP服务器上的镜像源,以及恢复Anaconda的默认源。示例中提到了清华大学和 Douban 的镜像源。

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

conda config --show-sources

conda index /opt/channel

conda config --prepend channels file:///opt/channel

如:

file:///home/spur/ppl170/pplce-1.7.0-mirror

file:///data/localchannel/localChannel/

设置FTP服务器作为源

conda config --prepend channels ftp://172.100.100.100/AI/pplce-1.7.0-mirror/

删除源

conda config --remove channels https://pypi.doubanio.com/simple/

添加其他源

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

#查看镜像源是否设置成功

conda config --set show_channel_urls yes

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/
conda config --set show_channel_urls yes
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/


恢复anaconda默认源

conda config --remove-key channels
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

飞行codes

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值