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

应无输出结果。

相关推荐
慕无言1 天前
pycharm2024选择conda环境
conda
灯下夜无眠2 天前
conda打包环境上传spark集群
大数据·spark·conda
YuSun_WK4 天前
使用conda配置环境时遇到的问题
conda
Caven774 天前
【Linux 技巧】如何在登录时自动激活 Conda Base 环境
linux·运维·conda
梁辰兴4 天前
PyCharm使用了Conda的虚拟环境创建的的Python项目,下载库(包)到该项目的虚拟环境中
python·pycharm·conda·错误·异常·异常报错
qq_203769494 天前
在conda环境中使用jupyter
python·jupyter·conda
中科院提名者5 天前
Conda与Pip混用导致的“幽灵包”现象
conda·pip
Victory_orsh6 天前
Conda常用命令集锦
conda
努力还债的学术吗喽9 天前
ffmpeg离线安装到服务器:解决conda/sudo/无法安装的通用方案
服务器·ffmpeg·conda
CodeLongBear9 天前
Python数据分析 -- Pandas基础入门学习笔记:从核心概念到实操代码
python·conda·pandas