pytorch快速安装
1.修改镜像源
pytorch官网下载很慢,需要换成国内的源,添加清华源。
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/pytorch/ #pytorch镜像
conda config --set show_channel_urls yes #下载的时候显示来源
2.安装pytorch
登陆https://pytorch.org/get-started/locally/,选择适合自己的版本
conda install pytorch-cpu torchvision-cpu -c pytorch
去掉 -c pytorch 即可快速安装。