🐍 Conda (数据科学包管理器) - 中科大镜像配置

复制以下命令到终端执行即可完成配置:

curl -sSL https://mirror2030.com/scripts/conda-ustc.sh | bash
✅ 所有脚本开源透明,可在下方查看完整内容

适合想了解具体步骤的用户:

# 生成配置文件
conda config --set show_channel_urls yes
# 编辑 ~/.condarc 添加镜像源

完整脚本内容(可复制保存):

#!/bin/bash
# Conda 镜像配置 - 中科大
# 由 镜像加速站 自动生成

echo "正在配置 Conda 镜像源..."

# 生成配置文件
conda config --set show_channel_urls yes

# 创建配置文件
cat > ~/.condarc << 'EOF'
channels:
  - defaults
show_channel_urls: true
default_channels:
  - https://mirrors.ustc.edu.cn/anaconda/pkgs/main
  - https://mirrors.ustc.edu.cn/anaconda/pkgs/r
  - https://mirrors.ustc.edu.cn/anaconda/pkgs/msys2
custom_channels:
  conda-forge: https://mirrors.ustc.edu.cn/anaconda/cloud
  pytorch: https://mirrors.ustc.edu.cn/anaconda/cloud
EOF

echo "✓ 配置文件已创建"

# 清除缓存
conda clean -i

echo "\n✅ Conda 镜像源已成功配置为 中科大"
echo "验证配置: conda config --show channels"
⬇️ 下载脚本文件

💡 使用提示

  • 配置后请重启终端或运行 source ~/.bashrc
  • 如遇问题可访问 教程中心 查看详细指南
  • 建议定期测速选择最优镜像源
← 返回选择其他镜像源 🏠 返回首页