1. 程式人生 > >(轉存)pip安裝報錯:is not a supported wheel on this platform

(轉存)pip安裝報錯:is not a supported wheel on this platform

print 平臺 quest 通過 安裝報錯 文件名 tle 報錯 tac

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

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

  我下載到的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)

  (python庫下載地址(庫很豐富,下載速度也很快):http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy)

(來源:https://www.cnblogs.com/nice-forever/p/5371906.html)

(轉存)pip安裝報錯:is not a supported wheel on this platform