Quick Retrieve on Google     Quick Retrieve on Bing

Combine Art and Sciences

Blogs transfered from: blog.csdn.net/sonictl

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

使用SJTU的Anaconda镜像

This blog is out of date. Check out my new blog holder: sonictl.github.io

本网站上的博文已经停止维护/更新了。 请移步到新的博客空间:sonictl.github.io

清华TUNA的Anaconda镜像不稳,好的时候一切顺利,坏的时候一个24K的包下5分钟;Anaconda的官方源则更惨,连repo.json都下不下来;
今天又是清华的源抽风的一天:Pytorch下载到100MB就超时,折腾了三个小时也装不上。而同在华东的SJTU的镜像就很稳定,这次全线换成SJTU啦。

首先执行

conda config --set show_channel_urls yes

/usr下生成.condarc文件,然后将其内容替换为

channels:
  - defaults
show_channel_urls: true
channel_alias: https://anaconda.mirrors.sjtug.sjtu.edu.cn
default_channels:
  - https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/main
  - https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/free
  - https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/r
  - https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/pro
  - https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/msys2
custom_channels:
  conda-forge: https://anaconda.mirrors.sjtug.sjtu.edu.cn/cloud
  msys2: https://anaconda.mirrors.sjtug.sjtu.edu.cn/cloud
  bioconda: https://anaconda.mirrors.sjtug.sjtu.edu.cn/cloud
  menpo: https://anaconda.mirrors.sjtug.sjtu.edu.cn/cloud
  pytorch: https://anaconda.mirrors.sjtug.sjtu.edu.cn/cloud
  simpleitk: https://anaconda.mirrors.sjtug.sjtu.edu.cn/cloud

再运行conda clean -i清除索引缓存即可。
终于装上Pytorch了,可喜可贺😂

posted on 2021-06-17 21:25  sonictl  阅读(380)  评论(0编辑  收藏  举报