使用清华镜像进行下载pytorch

  1. 使用pytorch官方的命令进行下载pytorch太慢。考虑使用清华的镜像进行安装pytorch。
  2. 清华的anocoda镜像网站:
    进入anaconda 的清华镜像帮助:网站为:https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/
    步骤:
  • 命令行输入:
  • conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
  • 然后再输入: conda install pytorch torchvision
  • !在这里插入图片描述
    最终出现了如上的问题。
    考虑使用pip镜像安装:
    python3 -m pip install --upgrade torch torchvision -i https://pypi.tuna.tsinghua.edu.cn/simple
    或者使用如下中科大的源:
    pip3 install torch torchvision -i https://pypi.mirrors.ustc.edu.cn/simple
    安装成功之后:
    在这里插入图片描述
发布了126 篇原创文章 · 获赞 5 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/zhpf225/article/details/103714517