PyTorch 安装失败找不到满足要求的版本 [英] PyTorch installation fails Could not find a version that satisfies the requirement

查看:838
本文介绍了PyTorch 安装失败找不到满足要求的版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 PyCharm 社区版 2020.2.3 x64 安装 PyTorch 和Windows 10 pro 64 位操作系统 PC 机上的 Python 3.9.0

我试过了:

pip install torch==1.7.0+cpu torchvision==0.8.1+cpu torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html

和:

python -m pip install torch==1.7.0 -f https://download.pytorch.org/whl/torch_stable.html

我是否应该降级 Python 版本,让我们说到 Python 3.8.6 或 PyTorch 版本,以使其工作,或者除此之外我是否做了其他错误的事情,可能错过了要安装的东西,例如我没有选择 CUDA,但是似乎是不同的原因:

<块引用>

错误:找不到满足要求的版本torch==1.7.0+cpu(来自版本:0.1.2、0.1.2.post1、0.1.2.post2)错误:找不到与 torch==1.7.0+cpu 匹配的发行版

使用 pip3 安装 https://download.pytorch.org/whl/cpu//torch-1.7.0%2Bcpu-cp38-cp38-win_amd64.whl:

<块引用>

错误:torch-1.7.0+cpu-cp38-cp38-win_amd64.whl 不受支持这个平台上的轮子.

pip install torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html -vvv

<块引用>

错误:找不到满足要求的版本torch==1.4.0+cpu(来自版本:0.1.2、0.1.2.post1、0.1.2.post2)错误:找不到与 torch==1.4.0+cpu 匹配的发行版

任何建议、指南或示例都会有所帮助

解决方案:

使用 Python 3.8.6 成功安装

解决方案

我尝试过 Python 3.8.0、Python 3.8.5、Python 3.8.6 和 Python 3.9.0.它似乎只适用于 3.8.6 版本.

I'm trying to install PyTorch with PyCharm Community Edition 2020.2.3 x64 and Python 3.9.0 on Windows 10 pro 64-bit OS PC machine

I've tried:

pip install torch==1.7.0+cpu torchvision==0.8.1+cpu torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html

and:

python -m pip install torch==1.7.0 -f https://download.pytorch.org/whl/torch_stable.html

Should I downgrade Python version, let's say to Python 3.8.6 or PyTorch version, to make it work, or am I doing something else incorrectly besides this, maybe missed something to install, for example I did not selected CUDA, but seems like it is different reason:

ERROR: Could not find a version that satisfies the requirement torch==1.7.0+cpu (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2) ERROR: No matching distribution found for torch==1.7.0+cpu

with pip3 install https://download.pytorch.org/whl/cpu//torch-1.7.0%2Bcpu-cp38-cp38-win_amd64.whl:

ERROR: torch-1.7.0+cpu-cp38-cp38-win_amd64.whl is not a supported wheel on this platform.

and

pip install torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html -vvv

ERROR: Could not find a version that satisfies the requirement torch==1.4.0+cpu (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2) ERROR: No matching distribution found for torch==1.4.0+cpu

Any advice, guide or example would be helpful

Solution:

Installed successfully with Python 3.8.6

解决方案

I tried with Python 3.8.0, Python 3.8.5, Python 3.8.6 and Python 3.9.0. It seems to work only with 3.8.6 version.

这篇关于PyTorch 安装失败找不到满足要求的版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆