我正在尝试通过编写pip3 install torchvision来安装torchvision,但是我得到了以下消息
Requirement already satisfied: torchvision in ./venv/lib/python3.6/site-packages (0.7.0)
Requirement already satisfied: numpy in ./venv/lib/python3.6/site-packages (from torchvision) (1.19.2)
Requirement already satisfied: pillow>=4.1.1 in ./venv/lib/python3.6/site-packages (from torchvision) (7.2.0)
Collecting torch==1.6.0 (from torchvision)
Could not find a version that satisfies the requirement torch==1.6.0 (from torchvision) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2, 0.3.0.post4, 0.3.1, 0.4.0, 0.4.1, 1.0.0, 1.0.1, 1.0.1.post2, 1.1.0, 1.1.0.post2, 1.2.0, 1.3.0, 1.3.0.post2, 1.3.1, 1.4.0)
No matching distribution found for torch==1.6.0 (from torchvision)我目前已经安装了torch==1.4.0,但显然还不足以安装torchvision。当我尝试使用代码pip3 install torch==1.6.0时,我得到了以下错误
Collecting torch==1.6.0
Could not find a version that satisfies the requirement torch==1.6.0 (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2, 0.3.0.post4, 0.3.1, 0.4.0, 0.4.1, 1.0.0, 1.0.1, 1.0.1.post2, 1.1.0, 1.1.0.post2, 1.2.0, 1.3.0, 1.3.0.post2, 1.3.1, 1.4.0)
No matching distribution found for torch==1.6.0有人知道我怎么解决这个问题吗?
发布于 2020-09-20 07:28:09
我已经解决了这个问题。所以我安装了torch==1.4.0,因为这是我笔记本电脑公认的最新版本,但由于某些原因,当我尝试安装torchvision时,它立即升级到最新版本(0.7.0)。我在pytorch网站上发现torch==1.4.0与torchvision==0.5.0相关。因此,我运行代码pip3 install torch==1.4.0 torchvision==0.5.0来卸载torchvision==0.7.0并安装0.5.0。现在它运行得很好。希望这个解释能有所帮助
发布于 2020-09-20 04:41:50
并指定您的平台。到目前为止,这是安装所需内容的最佳方式。对于Windows,可能如下所示:
pip install torch===1.6.0 torchvision===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html搜索胡萝卜:

https://stackoverflow.com/questions/63972921
复制相似问题