Miniconda更换源

1.在windows下创建.condarc文件

在Anaconda Powershell中执行下面的命令

conda config --set show_channel_urls yes

2. 在.condarc文件里写入源信息

之后可以在:C盘/用户/你的个人用户目录下找到.condarc文件,打开添加下面的源信息:

channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
ssl_verify: true

3. 如果需要pytorch, 则可添加pytorch的镜像:

在Anaconda Powershell中执行下面的命令

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/

4. 换回conda的默认源

在Anaconda Powershell中执行下面的命令

conda config --remove-key channels

文章出处登录后可见!

已经登录?立即刷新

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
乘风的头像乘风管理团队
上一篇 2022年5月19日
下一篇 2022年5月19日

相关推荐