安装pytorch运行以下命令:
conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=10.0 -c pytorch
出现如下报错
使用以下方法添加镜像源,看是否可以解决:
# 显示镜像配置
conda config --show
如果镜像源比较单一,就可以添加一些镜像源试试:
# 添加新镜像源
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 --set show_channel_urls yes
其他镜像源参考conda常用操作和配置镜像源_conda 源-CSDN博客