使用pip安装Python时出现:is not a supported wheel on this platform报错如何解决

发布时间:2021-03-02 16:49:09 作者:Leah
来源:亿速云 阅读:369

使用pip安装Python时出现: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

报错如下图:

使用pip安装Python时出现:is not a supported wheel on this platform报错如何解决

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

 使用pip安装Python时出现: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

看完上述内容是否对您有帮助呢?如果还想对相关知识有进一步的了解或阅读更多相关文章,请关注亿速云行业资讯频道,感谢您对亿速云的支持。

推荐阅读:
  1. windows系统python如何安装pygame
  2. 运行Scrapy程序时出现No module named win32api问题的解决思路和方法

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

python pip

上一篇:如何在Ubuntu12系统中搭建一个PHP5.3开发环境

下一篇:如何在Mac OS中安装Go语言编译器

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》