python通过pip安装torch错误及解决办法ERROR: Could not find a version that satisfies the requirement torch

错误代码

pip install torch==1.6.0+cu101 to
rchvision==0.7.0+cu101 -f https://download.pytorch.org/whl/torch_stable.htm
l
Looking in links: https://download.pytorch.org/whl/torch_stable.html
ERROR: Could not find a version that satisfies the requirement torch==1.6.0
+cu101
ERROR: No matching distribution found for torch==1.6.0+cu101

先去官网查找需要安装的版本

https://pytorch.org/ 

python通过pip安装torch错误及解决办法ERROR: Could not find a version that satisfies the requirement torch_第1张图片

这个代码执行也不行,只能去这里手动查找 https://pytorch.org/get-started/previous-versions/

python通过pip安装torch错误及解决办法ERROR: Could not find a version that satisfies the requirement torch_第2张图片

进入错误提示里的下载地址

python通过pip安装torch错误及解决办法ERROR: Could not find a version that satisfies the requirement torch_第3张图片

选择一个然后用迅雷下载

python通过pip安装torch错误及解决办法ERROR: Could not find a version that satisfies the requirement torch_第4张图片

然后cmd进入下载目录,运行pip install 文件名,有的电脑还是会出错,一般情况是废了,建议换个电脑在试,下面是各种错误的截图

 python通过pip安装torch错误及解决办法ERROR: Could not find a version that satisfies the requirement torch_第5张图片

 使用另种命令安装torch,安装成功了,但是还是用不了python通过pip安装torch错误及解决办法ERROR: Could not find a version that satisfies the requirement torch_第6张图片

 安装cuda前测试是False,安装cuda后就会变成true

 python通过pip安装torch错误及解决办法ERROR: Could not find a version that satisfies the requirement torch_第7张图片

cuda安装

 python通过pip安装torch错误及解决办法ERROR: Could not find a version that satisfies the requirement torch_第8张图片

你可能感兴趣的:(Python,python,人工智能)