安装
Anaconda
Miniconda
配置
查看当前源
conda config --show channels
替换源
语法如下
conda config --add channels https://xxxxxxxxxxxxxxx
针对清华源和腾讯源替换的方法
清华源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro/
腾讯源
conda config --add channels https://mirrors.cloud.tencent.com/anaconda/pkgs/free/
conda config --add channels https://mirrors.cloud.tencent.com/anaconda/pkgs/main/
conda config --add channels https://mirrors.cloud.tencent.com/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.cloud.tencent.com/anaconda/cloud/pytorch/
conda config --add channels https://mirrors.cloud.tencent.com/anaconda/pkgs/pro/
移除源
语法如下
conda config --remove channels https://xxxxxxxxxxxxxxx
针对清华源和腾讯源移除的方法
清华源
conda config --remove channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --remove channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --remove channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --remove channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --remove channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro/
腾讯源
conda config --remove channels https://mirrors.cloud.tencent.com/anaconda/pkgs/free/
conda config --remove channels https://mirrors.cloud.tencent.com/anaconda/pkgs/main/
conda config --remove channels https://mirrors.cloud.tencent.com/anaconda/cloud/conda-forge/
conda config --remove channels https://mirrors.cloud.tencent.com/anaconda/cloud/pytorch/
conda config --remove channels https://mirrors.cloud.tencent.com/anaconda/pkgs/pro/
使用配置文件修改
使用文档编辑工具打开 ~/.condarc
文件,即可手动修改配置信息。
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro/
- defaults
show_channel_urls: true
Caleb https://reinness.com/posts/245 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自小陈博客 !