win10/linux 安装 pytorch 的 cpu 版本

win10/linux 电脑没有 nvidia 驱动,也就没有 cuda,所以只能安装 pytorch 的 cpu 版本。目前已有 python 3.7 和 pip,这是前提。

1. pytorch官网 查看安装要求。

CUDA 项选为 None 表示 cpu 版本。如果是 linux 操作系统,在 Your OS 项选择 Linux。绿框中即为安装要求。

win10/linux 安装 pytorch 的 cpu 版本_第1张图片

2. 安装

对应上面绿框中的安装要求进行安装。直接在 cmd 中运行

pip install torch==1.7.1+cpu torchvision==0.8.2+cpu torchaudio===0.7.2 -f https://download.pytorch.org/whl/torch_stable.html

3*.

打开 https://download.pytorch.org/whl/torch_stable.html
找到 cpu/torch-1.7.1,其中 -cp37-cp37m-win_amd64 即表示对应 python3.7 版本和 win 系统。

win10/linux 安装 pytorch 的 cpu 版本_第2张图片

右键复制链接,可以使用 pip 安装

pip install https://download.pytorch.org/whl/cpu/torch-1.7.1%2Bcpu-cp37-cp37m-win_amd64.whl

你可能感兴趣的:(pytorch)