python安装whl包时出现的问题解决:is not a supported wheel on this platform

@

一、问题

1、下载一个twisted

安装Twisted,进入https://www.lfd.uci.edu/~gohlke/pythonlibs 下载对应twisted

下载好之后 ,我将Twisted-18.4.0-cp36-cp36m-win_amd64.whl,放在E:\\Twisted-18.4.0-cp36-cp36m-win_amd64.whl

根据你的Python的版本选择合适的包,名称中间的cp36是python3.6的意思,amd64是python的位数

在安装python的whl包时,出现了以下问题:
在这里插入图片描述

Twisted-20.3.0-cp38-cp38-win32.whl is not a supported wheel on this platform.

二、查找问题

因为whl包是在该网址下载的:https://www.lfd.uci.edu/~gohlke/pythonlibs .
在这里插入图片描述
本人python版本是3.8.0,所以下载所需whl包时,下载的是:Twisted-20.3.0-cp38-cp38-win32.whl,刚开始下载了win_amd64.whl版本的。

根据网上查找的解决方法:下载32位的即可,但是,很不幸,我的还是这问题:
在这里插入图片描述

三、问题解决

# 进入python,输入以下代码,查看pip支持的类型
import pip._internal
print(pip._internal.pep425tags.get_supported())
运行结果:
[('cp38', 'cp38m', 'win32'), ('cp38', 'none', 'win32'), ('py3', 'none', 'win32'), ('cp38', 'none', 'any'), ('cp3', 'none', 'any'), ('py38', 'none', 'any'), ('py3', 'none', 'any'), ('py37', 'none', 'any'), ('py36', 'none', 'any'), ('py35', 'none', 'any'), ('py34', 'none', 'any'), ('py33', 'none', 'any'), ('py32', 'none', 'any'), ('py31', 'none', 'any'), ('py30', 'none', 'any')]

可以看到,我们下载的whl包,命名不符合python3.8.0的安装支持,将其命名为:Twisted-20.3.0-cp38-cp38m-win32.whl 即可。
重新进行安装:

pip install E:\Twisted-20.3.0-cp38-cp38m-win32.whl

在这里插入图片描述
安装成功,问题成功解决。

posted @ 2020-12-29 09:45  ruoli-s  阅读(1646)  评论(0编辑  收藏  举报