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

简介: No matching distribution found

一、环境


系统环境:Windows10

Python版本:Python3.6.0

IDE:Pycharm、Spyder


二、问题


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


pipinstalltorch==1.2.0-ihttp://pypi.douban.com/simple--trusted-hostpypi.douban.com


出现了如下错误:


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


pipinstalltorch==1.2.0-fhttps://download.pytorch.org/whl/torch_stable.html


但一波刚平,一波又起,这时又报了另一个错: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 即可。


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


pipinstall--usertorch==1.3.0-fhttps://download.pytorch.org/whl/torch_stable.html-ihttp://pypi.douban.com/simple/--trusted-hostpypi.douban.com。


最后成功安装~


pipinstall--usertorch==1.2.0-fhttps://download.pytorch.org/whl/torch_stable.html-ihttp://pypi.douban.com/simple/--trusted-hostpypi.douban.com
目录
相关文章
|
网络安全 Python Windows
pyspark--完美解决 Could not find a version that satisfies the requirement 安装包名字 (from versions: )
pyspark--完美解决 Could not find a version that satisfies the requirement 安装包名字 (from versions: )
1248 9
|
并行计算 异构计算
卸载原有的cuda,更新cuda
本文提供了一个更新CUDA版本的详细指南,包括如何查看当前CUDA版本、检查可安装的CUDA版本、卸载旧版本CUDA以及安装新版本的CUDA。
14339 3
卸载原有的cuda,更新cuda
|
Python
PyCharm View as Array 查看数组
PyCharm View as Array 查看数组
628 1
|
Ubuntu 开发工具 虚拟化
Jetson 学习笔记(十六):使用SDK Manager烧录Jetson Nano
这篇博客介绍了如何使用Nvidia SDK Manager烧录Jetson Nano。首先,需要在Ubuntu系统中安装VMware虚拟机和Nvidia SDK Manager。然后,通过连接Jetson Nano并进行一系列设置,包括FC_REC脚接GND,连接HDMI、鼠标键盘和电源线。在Ubuntu上通过lsusb确认设备连接后,使用SDK Manager进行烧录,选择Manual Setup-Jetson Nano,设置用户名和密码,然后点击flash完成安装。完成后,可以断开连接并启动Jetson Nano,进入Ubuntu安装界面。
1906 2
Jetson 学习笔记(十六):使用SDK Manager烧录Jetson Nano
Visual Studio2019安装闪退(不弹出下载界面)等问题解决方法
Visual Studio2019安装闪退(不弹出下载界面)等问题解决方法
1679 0
Visual Studio2019安装闪退(不弹出下载界面)等问题解决方法
|
开发者 Python
Flask的一种启动方式和三种托管方式
本文介绍了 Flask 的四种启动方法:原生启动、gevent 启动、tornado 启动以及 waitress 启动。每种启动方法都有其优点和适用场景,除本文四种启动方式外,Flask还支持其他很多种启动方式和托管方式,开发者可以根据自己的需求进行选择。
1371 1
|
机器学习/深度学习 编解码 算法
超分辨率相关的开源项目
该文档介绍了多种超分辨率模型及其GitHub项目地址,包括Real-ESRGAN(优化真实图片质量)、RCAN(基于残差结构与通道注意力机制)、SwinIR(基于Swin Transformer的图像恢复)、FSRCNN(轻量级快速超分辨率)、EDSR(增强型深度残差网络)、SRGAN(利用GAN的超分辨率模型)及LapSRN(多级Laplacian金字塔超分辨率)。
|
机器学习/深度学习 大数据 PyTorch
行为检测(一):openpose、LSTM、TSN、C3D等架构实现或者开源代码总结
这篇文章总结了包括openpose、LSTM、TSN和C3D在内的几种行为检测架构的实现方法和开源代码资源。
1051 0