首页 > 分享 > No matching distribution found for torch==1.2.0 解决方法

No matching distribution found for torch==1.2.0 解决方法

一、环境

系统环境:Windows10
Python版本:Python3.6.0
IDE:Pycharm、Spyder

二、问题

今天用 pip 安装torch,安装方式如下:

pip install torch==1.2.0 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com 1

出现了如下错误:

ERROR:Could not find a version that satisfies the requirement torch1.2.0
ERROR:No matching distribution found for torch1.2.0

三、解决方法

关于"Could not find a version that satisfies…"这类问题,网上说的比较多的主要有这么几种方法:

1、更新pip

python -m pip install --upgrade pip

2、用国内的镜像源来加速网络

pip install 包名 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
其中 --trusted-host pypi.douban.com 是为了获得 SSL 证书的认证。

3. 最终解决

以上方法都试了,然而都没有效果…

恰在此时,不经意间看见一篇文章 Windows 上报错:Could not find a version that satisfies the requirement torch==0.4.1

与我所碰到的问题很类似!于是借鉴这位网友的做法,用 pip 命令从 Pytorch 官网下载指定的版本:

https://www.jianshu.com/p/f54a01419330?utm_campaign=haruki

pip install torch==1.2.0 -f https://download.pytorch.org/whl/torch_stable.html 1

但一波刚平,一波又起,这时又报了另一个错:Could not install packages due to an EnvironmentError:[WinError 5] Permission denied
这是由于权限不够,于是将指令改为 pip install --user torch==1.3.0 -f https://download.pytorch.org/whl/torch_stable.html 即可。

当然,也可使用镜像源加速下载,相应的命令为:

pip install --user torch==1.3.0 -f https://download.pytorch.org/whl/torch_stable.html -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com。 1

最后成功安装~

pip install --user torch==1.2.0 -f https://download.pytorch.org/whl/torch_stable.html -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com 1

相关知识

No CUDA runtime is found, using CUDA
Could not find a version that satisfies the requirement torch==1.1.0.post2)
养宠物的人要做“TORCH”检查
ToRCH感染防控,可以从这篇文章开始
Nothing found for Roll 2020 11 10 133779
河南省鸟类分布新纪录——白颊噪鹛
南充市同域分布的白腰文鸟白颊噪鹛和白头鹎巢和巢材比较研究
Population Biology and Altitudinal Distribution of Caboti Tragopans in Jiangxi Wuyishan Nature Reserve
踩坑指南!pytorch1.2.0安装!又是猛男落泪的一天!
基于Pytorch框架的深度学习densenet121神经网络鸟类行为识别分类系统源码

网址: No matching distribution found for torch==1.2.0 解决方法 https://m.mcbbbk.com/newsview403438.html

所属分类:萌宠日常
上一篇: 北京女子给宠物狗挤肛门腺致感染,
下一篇: tf