无法安装 pip install torchvision

cannot install pip install torchvision

我正在使用 python 3.8.3 版本,我尝试安装 torchvision 和 torch 模块并遇到此错误,其中 none 个已安装。错误出现为 ERROR:could not find a version that satisfies the requirement torch==1.4.0(from versions:0.1.2,0.1.2,post1,0.1.2.post2)

Error:No matching distribution found for torch==1.4.0

根据 PyTorch 的网站,从 pip.

安装时,您必须指定您使用的是 cpu 还是 CUDA 版本

例如,如果我想在没有 CUDA 的 Linux 系统上安装 PyTorch 1.5.1 版,我会 运行:

pip install torch==1.5.1+cpu torchvision==0.6.1+cpu -f https://download.pytorch.org/whl/torch_stable.html

您可以使用我上面提供的 link 来获取适合您特定环境的语法。