Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot install numpy from wheel format

I am trying to install NumPy from a wheel (.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

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

The log file shows:


d:\Program Files\WinPython-64bit-3.4.2.4\python-3.4.2.amd64\Scripts\pip 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:\Python34\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "D:\Python34\lib\site-packages\pip\commands\install.py", line 257, in run
InstallRequirement.from_line(name, None))
File "D:\Python34\lib\site-packages\pip\req.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?

like image 298
lmsasu Avatar asked Jan 23 '15 09:01

lmsasu


People also ask

Could not build wheels for NumPy which is required to install?

What causes error: failed building wheel for NumPy error. Most of the time this type of error comes when there is a NumPy version released. The current NumPy releases do not support the specific python version. So the wheel format file is unable to install the version of the Numpy in your system.

Does Python 3.7 support NumPy?

The Python versions supported in this release are 3.8-3.10, Python 3.7 has been dropped.


1 Answers

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.

like image 70
Simeon Visser Avatar answered Sep 24 '22 00:09

Simeon Visser