阿里云anaconda镜像源已于2023年6月停止同步更新,导致包陈旧、依赖解析失败、安装报错等问题,故不建议使用;当前应迁移到每日同步的清华tuna镜像源。

阿里云镜像源目前已停止维护,不建议新配置;若已有配置,请尽快迁移到清华源或其他活跃镜像。
为什么现在不能用阿里云镜像源
阿里云 Anaconda 镜像在 2023 年 6 月已正式停止同步更新。这意味着:
- 所有
https://mirrors.aliyun.com/anaconda/下的包链接(如pkgs/main、pkgs/free、cloud/conda-forge)自那以后不再接收新版本 - conda 解析依赖时可能卡在
Solving environment,因为元数据陈旧,无法匹配新版 Python 或库的约束 - 安装
numpy、pytorch、scipy等常用包时,常报PackageNotFoundError或回退到默认源下载失败 - 即使命令执行成功,实际生效的仍是过期缓存,容易引发环境不一致问题
如何检查当前是否还在用阿里源
运行以下命令查看当前生效的 channels:
conda config --get channels
如果输出中包含类似 https://mirrors.aliyun.com/anaconda/pkgs/main 的地址,说明仍在使用阿里源。也可直接查看配置文件:
- Linux/macOS:
~/.condarc - Windows:
C:Users\.condarc
打开该文件,搜索 aliyun 即可确认。
一款AI工具,主要用于在主代理响应前,并行运行Kimi K2.5和GPT 5.3 Codex,注入双方观点以增强认知多样性,适合需要提升相关任务效率的用户。
替换成清华源的实操步骤
清华 TUNA 镜像目前保持每日同步,覆盖 pkgs/main、pkgs/r、conda-forge、pytorch 等主流 channel,是当前最稳定的选择:
- 执行命令一次性添加(推荐):
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main<br>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r<br>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge<br>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch
- 设置显示 channel URL,便于调试:
conda config --set show_channel_urls yes
- 删除残留的阿里源(如有):
conda config --remove channels https://mirrors.aliyun.com/anaconda/pkgs/main<br>conda config --remove channels https://mirrors.aliyun.com/anaconda/pkgs/free
完成后再次运行 conda config --get channels,应看到清华域名排在 defaults 前面——channel 顺序决定优先级,越靠前越先被查询。
额外提醒:conda 和 pip 要分开配
只改 conda 源不影响 pip。如果你还用 pip install,需单独配置 pip 镜像:
- 设为清华源(推荐):
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
- 或阿里源(仅限 pip,因阿里 PyPI 镜像仍在维护):
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple<br>pip config set install.trusted-host mirrors.aliyun.com
注意:pip 的阿里源和 conda 的阿里源是两套独立服务,前者可用,后者不可用——这点最容易混淆。
真正要小心的是配置文件里混用旧阿里源和新清华源,导致 conda 在解析时来回跳 channel,既慢又容易出错。删干净再重配,比修修补补更省时间。










