赞
踩
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
执行command
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
如果感觉以上仍然很慢,可以尝试用pip工具安装
pip install torch torchvision -i https://pypi.tuna.tsinghua.edu.cn/simple
出现下面这个字样表示安装成功
import torch
print(torch.__version__)
结果如下表示成功
注:本次使用的是vm虚拟机,所以不能够使用cuda,如果实体机安装cuda后安装pytorch可以使用gpu
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。