赞
踩
安装版本:pytorch==1.4.0 torchvision==0.5.0 cudatoolkit=10.1,pytorch官网
第一步:安装 conda 镜像通道
- 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
第二步:
官方命令:
- # CUDA 10.1
- conda install pytorch==1.4.0 torchvision==0.5.0 cudatoolkit=10.1 -c pytorch
实际执行: 去除 -c pytorch ,因为该参数指的是指定官方的通道,导致下载的路径不是国内源,因此去除该参数
canda 执行 命令如下:
conda install pytorch==1.4.0 torchvision==0.5.0 cudatoolkit=10.1
最后,验证安装是成功:
import torch
安装查考文章:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。