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

应无输出结果。

相关推荐
love530love2 天前
EPGF 架构下的 Python 环境变量设置建议——Anaconda 路径精简后暴露 python 及工具到环境变量的配置记录 [三]
开发语言·人工智能·windows·python·架构·conda·epgf 架构
fayuan06962 天前
一、Pytorch安装教程-windows环境,利用Anaconda搭建虚拟环境,Pycharm开发工具
人工智能·pytorch·pycharm·conda
cyforkk12 天前
Anaconda配置环境变量和镜像
conda
❀搜不到13 天前
查询 conda + pip 装的包
windows·conda·pip
胡耀超16 天前
4、Python面向对象编程与模块化设计
开发语言·python·ai·大模型·conda·anaconda
1373i16 天前
【Python】pytorch安装(使用conda)
pytorch·python·conda
~|Bernard|17 天前
在 PyCharm 里怎么“点鼠标”完成指令同样的运行操作
算法·conda
您的通讯录好友17 天前
conda环境导出
linux·windows·conda
剑客的茶馆18 天前
新服务器从0开始搭配Ubuntu+Conda+Docker+Dify
服务器·ubuntu·docker·conda·dify
豆浩宇18 天前
Conda环境隔离和PyCharm配置,完美同时运行PaddlePaddle和PyTorch
人工智能·pytorch·算法·计算机视觉·pycharm·conda·paddlepaddle