Windows下Python Extension Packages二進位安裝檔案__Python

來源:互聯網
上載者:User

二進位安裝檔案下載地址:https://www.lfd.uci.edu/~gohlke/pythonlibs/

問題:pip安裝報錯,XXXX is not a supported wheel on this platform

可能的原因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)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.