Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
209 views
in Technique[技术] by (71.8m points)

python 3.x - Cannot install numpy from wheel format

I am trying to install numpy from whl file. I get the error:

numpy-1.9.1%2Bmkl-cp34-none-win_amd64.whl is not a supported wheel on this platform.

Details: Windows 8.1 pro x64, elevated command prompt

Python 3.4.2

package numpy from Gohlke's site

numpy-1.9.1%2Bmkl-cp34-none-win_amd64.whl copied in the pip.exe folder

The log file shows:


d:Program FilesWinPython-64bit-3.4.2.4python-3.4.2.amd64Scriptspip run on 01/23/15 11:55:21 numpy-1.9.1%2Bmkl-cp34-none-win_amd64.whl is not a supported wheel on this platform. Exception information: Traceback (most recent call last): File "D:Python34libsite-packagespipasecommand.py", line 122, in main status = self.run(options, args) File "D:Python34libsite-packagespipcommandsinstall.py", line 257, in run InstallRequirement.from_line(name, None)) File "D:Python34libsite-packagespip eq.py", line 167, in from_line raise UnsupportedWheel("%s is not a supported wheel on this platform." % wheel.filename) pip.exceptions.UnsupportedWheel: numpy-1.9.1%2Bmkl-cp34-none-win_amd64.whl is not a supported wheel on this platform.

What is wrong?

Question&Answers:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Short answer: rename the file to numpy-1.9.1%2Bmkl-cp34-none-win32.whl to install it.

You can check what tags your pip tool accepts for installation by running:

import pip; print(pip.pep425tags.get_supported())

In this case pip is incorrectly detecting your operating system to be 32-bits and the file you're trying to install was win_amd64 in its filename.

If you rename the file to numpy-1.9.1%2Bmkl-cp34-none-win32.whl (which now contains the tags that are considered supported) then you can install the package. It's a trick because the file is still built for 64-bits but this allows you to install the package as intended.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...