[Python] mypkg-1.1.0-cp27-cp27mu-linux_x86_64.whl is not a supported wheel on this platform.

Jaime Lin
2 min readFeb 23, 2021
A Bug

Background

I tried to install a wheel package file by pip, but it showed the error.

$ pip install dist/mypkg-1.1.0-cp27-cp27mu-linux_x86_64.whl

I got:

pyzeal-1.1.0-cp27-cp27mu-linux_x86_64.whl is not a supported wheel on this platform.

Solution

Renaming the wheel file to fit the supported wheel format. To get the supported format in your environment.

Python 2.7.11 (default, May  8 2019, 02:10:04)
[GCC 5.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pip; print(pip.pep425tags.get_supported())
[('cp27', 'cp27m', 'manylinux1_x86_64'), ('cp27', 'cp27m', 'linux_x86_64'), ('cp27', 'none', 'manylinux1_x86_64'), ('cp27', 'none', 'linux_x86_64'), ('py2', 'none', 'manylinux1_x86_64'), ('py2', 'none', 'linux_x86_64'), ('cp27', 'none', 'any'), ('cp2', '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')]

So let’s rename it.

$ cp dist/mypkg-1.1.0-cp27-cp27mu-linux_x86_64.whl dist/mypkg-1.1.0-cp27-none-linux_x86_64.whl

And then the wheel file can be installed perfectly.

me:/# pip install dist/pyzeal-1.1.0-cp27-none-linux_x86_64.whl
Requirement already satisfied (use --upgrade to upgrade): mypkg==1.1.0 from file:///dist/mypkg-1.1.0-cp27-none-linux_x86_64.whl in /usr/lib/python2.7/site-packages

Others

Well, that’s really weird why it checks file names to validate the format…

If you like this post, you can buy me a coffee! :)

Reference

https://stackoverflow.com/questions/28107123/cannot-install-numpy-from-wheel-format?rq=1

--

--

Jaime Lin

From Taiwan, a beautiful island. Learning English and sharing code experience.