pip安装错误:is not a supported wheel on this platform解决办法

当使用pip安装Python库遇到'is not a supported wheel on this platform'错误时,可能是因为文件名格式不正确。通过在Python环境中输入`import pip; print(pip.pep425tags.get_supported())`来查看pip支持的文件格式。例如,将numpy的whl文件名从numpy-1.16.6-cp27-cp27m-win32.whl更改为numpy-1.16.6-cp27-none-win32.whl即可解决问题。若提示'module' object has no attribute 'pep425tags',则需用`import pip._internal; print(pip._internal.pep425tags.get_supported())`代替。
摘要由CSDN通过智能技术生成
  • 使用pip安装python库

python安装库可以使用:pip install 库名称==版本号,比如 pip install numpy==1.16.6

也可以下载.whl文件进行安装,命令行下将地址切换到.whl所在的位置:pip install XXX.whl

python库下载地址:http://www.lfd.uci.edu/~gohlke/pythonlibs

                                    https://pypi.org/

下载的库文件名中的cp27代表python2.7

 

  • is not a supported wheel on this platform问题

pip安装.whl文件可能会报错:is not a supported wheel on this platform

有可能是文件名格式不对

打开python,输入import pip; print(pip.pep425tags.get_supported())可以获取到pip支持的文件名还有版本,显示如下:

>>import pip; print(pip.pep425tags.get_supported())
[('cp27', 'none', 'win32'), ('py2', 'none', 'win32'), ('cp27', 'none',

  • 3
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值