1. 程式人生 > >Python——pip安裝報錯:is not a supported wheel on this platform

Python——pip安裝報錯:is not a supported wheel on this platform

它的 form pytho 可能 通過 one 令行 div 版本

pip安裝報錯:is not a supported wheel on this platform

可能的原因1:安裝的不是對應python版本的庫,下載的庫名中cp35代表python3.5,其它同理。

可能的原因2:這個是我遇到的情況(下載的是對應版本的庫,然後仍然提示不支持當前平臺)

我下載到的Twisted庫文件名:

Twisted-17.5.0-cp35-cp35m-win_amd64.whl

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

pip install Twisted-17.5.0-cp35-cp35m-win_amd64.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())
[(cp35, none, win_amd64), (py3, none, win_amd64), (cp35, none, any), (cp3, none, any), (cp34, none, any), (cp33, none
, any), (cp32, none, any), (cp31, none, any), (cp30, none, any), (py 35, none, any), (py3, none, any), (py34, none, any), (py33, none, any), (py32, none, any), (py31, none, any), (py30, none, any)]

通過這裏可以發現上面下載的文件名格式是不支持的,修改為:Twisted-17.5.0-cp35-none-win_amd64.whl即可成功安裝。

其它的庫也同理可以成功安裝,不過也請註意庫的依賴。

Python——pip安裝報錯:is not a supported wheel on this platform