conda中设置镜像地址(附所有可换的地址)

Conda 镜像配置


✅ 通用:先清空所有 channel 相关配置

在设置任一镜像前,请运行以下命令清除旧配置:

bash 复制代码
conda config --remove-key channels
conda config --remove-key default_channels
conda config --remove-key show_channel_urls
conda config --remove-key ssl_verify

这会彻底清除所有 channel 与相关设置,确保配置干净无残留。


1️⃣ 阿里云镜像配置(仅 channels)

bash 复制代码
conda config --add channels https://mirrors.aliyun.com/anaconda/pkgs/main
conda config --add channels https://mirrors.aliyun.com/anaconda/pkgs/r
conda config --add channels https://mirrors.aliyun.com/anaconda/pkgs/msys2
conda config --set show_channel_urls yes

2️⃣ 中科大(USTC)镜像配置(仅 channels)

bash 复制代码
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
conda config --set show_channel_urls yes
conda config --set ssl_verify true

3️⃣ 上海交大(SJTUG)镜像配置(仅 channels)

bash 复制代码
conda config --add channels https://mirrors.sjtug.sjtu.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.sjtug.sjtu.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.sjtug.sjtu.edu.cn/anaconda/cloud/conda-forge/
conda config --set show_channel_urls yes
conda config --set ssl_verify true

4️⃣ 清华大学(TUNA)镜像配置(仅 channels,推荐)

bash 复制代码
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
conda config --set show_channel_urls yes

🔍 验证当前配置

设置完成后,检查生效情况:

bash 复制代码
conda config --show channels
conda config --show show_channel_urls

若想查看是否已成功移除 default_channels,运行:

bash 复制代码
conda config --show | grep default_channels

应无输出结果。

相关推荐
Nightmare0044 天前
切换conda环境的时候输出zstandard could not be imported. Running without .conda support.
开发语言·python·conda
墨染天姬4 天前
【AI】conda常用指令
人工智能·conda
SCBAiotAigc4 天前
2026.2.25:conda与uv并存时,如何取消base激活
人工智能·python·conda·uv
何伯特5 天前
ROS与Conda的兼容性问题深度解析与解决方案
conda·ros
Autumn72996 天前
【系统重装】PYTHON 入门——速通版
开发语言·python·conda·cuda
C系语言7 天前
Anaconda、conda环境命令
conda
cooldream20098 天前
Conda 报错 InvalidArchiveError 深度排查与彻底解决指南:从缓存损坏到环境重建的完整思路
缓存·conda
C系语言8 天前
Conda查看虚拟环境
conda
Lw老王要学习9 天前
Windows 下 Miniconda 安装与 conda 命令无法识别问题解决指南
windows·llm·conda·agent
思绪无限10 天前
使用Conda创建Python环境并在PyCharm中配置运行项目
python·pycharm·conda·安装教程·python环境配置·环境配置教程