Anaconda修改镜像源安装PyTorch

醉酒当歌 提交于 2019-12-11 02:07:03

Conda 修改镜像源

  1. 查看目前已有的channel:
    conda config --show channels
  1. 添加新的channel:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
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/msys2/、
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --set show_channel_urls yes
  1. 在安装pytorch时,本人使用的cuda版本为10.1
conda install pytorch torchvision cudatoolkit=10.1

千万不能末位加上-c pytorch,是因为-c参数指明了下载pytorch的通道,优先级比清华镜像更高

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!