配置 conda 镜像环境

本文介绍了如何在Linux环境中配置conda镜像源,主要使用阿里云镜像站,通过修改配置文件和清理索引缓存来加速conda操作。
摘要由CSDN通过智能技术生成

镜像下载、域名解析、时间同步请点击 阿里巴巴开源镜像站

环境:conda/4.11.0 CPython/3.8.8 Windows/10
镜像源选用阿里云镜像站anaconda镜像:https://mirrors.aliyun.com/anaconda/
参考:https://conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html#show-channel-urls-show-channel-urls

使用配置文件修改镜像源

  • 使用 conda info 命令查看 .condarc 配置文件位置(一般为 $env:userprofile/.condarc)

  • 在 PowerShell 中使用 notepad $env:userprofile/.condarc 命令,通过记事本打开 .condarc (若提示文件不存在,则点击创建)

    • CMD 中可以使用 notepad %userprofile%/.condarc 命令

将以下内容填入 .condarc 文件中

channels:
  - defaults
show_channel_urls: true
default_channels:
  - http://mirrors.aliyun.com/anaconda/pkgs/main
  - http://mirrors.aliyun.com/anaconda/pkgs/r
  - http://mirrors.
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值