遇见报错:
ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
ERROR: No matching distribution found for torch
解决方法:
1、网站找到对应torch和torchvision版本,cp对应python版本,cu对应的是gpu版本的torch:https://download.pytorch.org/whl/torch_stable.html
2、下载对应版本
3、在下载的whl文件对应目录下打开cmd,进入对应虚拟环境,pip install xxx.whl即可
PS:安装后,通过torch.cuda.is_available()命令来判断是否是gpu版本
文章讲述了遇到PyTorch版本要求不满足的错误时,如何从官方网站下载对应版本的torch和torchvision,以及在虚拟环境中通过whl文件安装,并检查是否为GPU版本的方法。
819

被折叠的 条评论
为什么被折叠?



