我搜索了很多教程都没解决,还是报错:
ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
ERROR: No matching distribution found for torch
如图所示。
这个安装需要检查你的电脑里已安装的东西是否符合要求,比如你的电脑是否安装英伟达显卡,cuda的版本,python的版本。
如果这些都符合要求还是会出现这样的情况,建议使用conda创建虚拟环境然后在按照https://pytorch.org/给出的安装方式进行重新安装。
cuda安装有问题,最好把cuda工具箱安装了,可以如下安装,我举个例子,你可以参考它去改:
conda install cudatoolkit=10.0.130=0
pip install torch==1.5.0+cu101 torchvision==0.6.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html