Python使用pip安装报错:is not a supported wheel on this platform的解决方法


Posted in Python onJanuary 23, 2018

本文讲述了Python使用pip安装报错:is not a supported wheel on this platform的解决方法。分享给大家供大家参考,具体如下:

可能的原因1:安装的不是对应python版本的库,下载的库名中cp27代表python2.7,其它同理。

可能的原因2:这个是我遇到的情况(下载的是对应版本的库,然后仍然提示不支持当前平台

在https://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy中,我下载到的numpy库文件名:

numpy-1.10.4+mkl-cp27-cp27m-win32.whl

使用pip安装(在命令行中):

pip install numpy-1.10.4+mkl-cp27-cp27m-win32.whl

报错:***  is not a supported wheel on this platform,通过在stackoverflow上的一个帖子成功解决问题。

方法:在shell中输入

import pip; print(pip.pep425tags.get_supported())

可以获取到pip支持的文件名还有版本,我这里如下:

>>import pip; print(pip.pep425tags.get_supported())
[('cp27', 'none', 'win32'), ('py2', 'none', 'win32'), ('cp27', 'none', 'any'), ('cp2', 'none', 'any'), ('cp26', 'none', 'any'), ('cp25', 'none', 'any'), ('cp24', 'none', 'any'), ('cp23', 'none', 'any'), ('cp22', 'none', 'any'), ('cp21', 'none', 'any'), ('cp20', 'none', 'any'), ('py27', 'none', 'any'), ('py2', 'none', 'any'), ('py26', 'none', 'any'), ('py25', 'none', 'any'), ('py24', 'none', 'any'), ('py23', 'none', 'any'), ('py22', 'none', 'any'), ('py21', 'none', 'any'), ('py20', 'none', 'any')]

通过这里可以发现上面下载的文件名格式是不支持的,修改为:numpy-1.10.4+mkl-cp27-none-win32.whl即可成功安装。

其它的库也同理可以成功安装,不过也请注意库的依赖。

(参考帖子网址:http://stackoverflow.com/questions/28107123/cannot-install-numpy-from-wheel-format?rq=1

补充:skimage库安装报错的情况

同上述安装报错一样,笔者在本机win7+Python2.7.9环境下安装skimage库:scikit_image‑0.13.1‑cp27‑cp27m‑win32.whl

报错如下图:

Python使用pip安装报错:is not a supported wheel on this platform的解决方法

使用import pip; print(pip.pep425tags.get_supported())命令,结果如下:

 Python使用pip安装报错:is not a supported wheel on this platform的解决方法

此时将scikit_image‑0.13.1‑cp27‑cp27m‑win32.whl改为scikit_image-0.13.1-cp27-none-win32.whl

再使用

pip install scikit_image-0.13.1-cp27-none-win32.whl

安装即可。

希望本文所述对大家Python程序设计有所帮助。

Python 相关文章推荐
Python编程实现生成特定范围内不重复多个随机数的2种方法
Apr 14 Python
Python使用arrow库优雅地处理时间数据详解
Oct 10 Python
Python基于递归和非递归算法求两个数最大公约数、最小公倍数示例
May 21 Python
matplotlib.pyplot画图 图片的二进制流的获取方法
May 24 Python
python根据list重命名文件夹里的所有文件实例
Oct 25 Python
基于腾讯云服务器部署微信小程序后台服务(Python+Django)
May 08 Python
Flask框架重定向,错误显示,Responses响应及Sessions会话操作示例
Aug 01 Python
Python性能分析工具Profile使用实例
Nov 19 Python
对python中assert、isinstance的用法详解
Nov 27 Python
python在协程中增加任务实例操作
Feb 28 Python
Python os和os.path模块详情
Apr 02 Python
python实现一个简单的贪吃蛇游戏附代码
Jun 28 Python
Django实现组合搜索的方法示例
Jan 23 #Python
50行Python代码实现人脸检测功能
Jan 23 #Python
Python基于OpenCV实现视频的人脸检测
Jan 23 #Python
Python求出0~100以内的所有素数
Jan 23 #Python
python之matplotlib学习绘制动态更新图实例代码
Jan 23 #Python
彻底搞懂Python字符编码
Jan 23 #Python
Python实现PS滤镜的万花筒效果示例
Jan 23 #Python
You might like
小偷PHP+Html+缓存
2006/12/20 PHP
56.com视频采集接口程序(PHP)
2007/09/22 PHP
7个超级实用的PHP代码片段
2011/07/11 PHP
遭遇php的in_array低性能问题
2013/09/17 PHP
PHP实现定时执行任务的方法
2014/10/05 PHP
PHP读取汉字的点阵数据
2015/06/22 PHP
PHP模板引擎Smarty中变量的使用方法示例
2016/04/11 PHP
thinkPHP5.0框架应用请求生命周期分析
2017/03/25 PHP
PHP 面向对象程序设计之类属性与类常量实现方法分析
2020/04/13 PHP
PhpStorm2020.1 安装 debug - Postman 调用的详细教程
2020/08/17 PHP
jQuery遍历之next()、nextAll()方法使用实例
2014/11/08 Javascript
Javascript学习指南
2014/12/01 Javascript
Svg.js实例教程及使用手册详解(一)
2016/05/16 Javascript
javascript运算符——逻辑运算符全面解析
2016/06/27 Javascript
AngularJs页面筛选标签小功能
2016/08/01 Javascript
使用BootStrap实现标签切换原理解析
2017/03/14 Javascript
[04:00]黄浦江畔,再会英雄——完美世界DOTA2 TI9应援视频
2019/07/31 DOTA
跟老齐学Python之有容乃大的list(4)
2014/09/28 Python
Mac下Anaconda的安装和使用教程
2018/11/29 Python
Django在pycharm下修改默认启动端口的方法
2019/07/26 Python
Python 根据数据模板创建shapefile的实现
2019/11/26 Python
Python模块zipfile原理及使用方法详解
2020/08/04 Python
龟牌英国商店:Turtle Wax Brand Store UK
2019/07/02 全球购物
如何找出EMP表里面SALARY第N高的employee
2013/12/05 面试题
应届生文秘专业个人自荐信格式
2013/09/21 职场文书
参观监狱心得体会
2014/01/02 职场文书
优秀求职信范文分享
2014/01/26 职场文书
中班开学寄语
2014/04/04 职场文书
党的群众路线教育学习材料
2014/05/12 职场文书
餐饮服务员岗位职责
2015/02/09 职场文书
先进个人自荐书
2015/03/06 职场文书
企业投资意向书
2015/05/09 职场文书
企业党建工作总结2015
2015/05/26 职场文书
中学政教处工作总结
2015/08/13 职场文书
2016学习依法治国心得体会
2016/01/15 职场文书
Java 轮询锁使用时遇到问题
2022/05/11 Java/Android