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

@python

1、问题

一、下载一个twistedthis

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

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

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

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

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

2、查找问题

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

根据网上查找的解决方法:下载32位的便可,可是,很不幸,个人仍是这问题:
在这里插入图片描述ci

3、问题解决

# 进入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 便可。
从新进行安装:get

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

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

相关文章
相关标签/搜索