2

I have a Python project for which I create a wheel on system A. This wheel does not install on system B using pip but fails with the error message

... is not a supported wheel on this platform

As far as I can tell, the platforms in system A and B are the same in the relevant details. I could not find comprehensive documentation on the subject via google. So my questions:

  1. For a given machine, what is the best way to get the string that describes the platform data that is used in the pip file (e.g. "cp36-cp36m-win_amd64")?
  2. What is the complete set of parameters pip checks for a target wheel and platform to determine compatibility?
  3. How can I create a wheel that can be installed on many platforms at once, similar to "manylinux" but for Windows/Mac OSx?

Details:

I am creating the wheel using the command

python setup.py bdist_wheel

This generates the file

my_project_name-1.0.1-cp36-cp36m-win_amd64.whl

On my system, I can install the wheel using

pip install my_project_name-1.0.1-cp36-cp36m-win_amd64.whl

On the target system, the exact same command line on the exact same file yields the following error:

 my_project_name-1.0.1-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform

Both systems are 64-bit Windows 7.

Trying to get platform data on my system yields

>>> import platform
>>> platform.machine()
'AMD64'
>>> platform.platform()
'Windows-7-6.1.7601-SP1'
>>> platform.processor()
'Intel64 Family 6 Model 60 Stepping 3, GenuineIntel'
>>> platform.python_version()
'3.6.0'

Trying to get platform data on the target system yields

import platform
platform.machine()
'AMD64'
platform.platform()
'Windows-7-6.1.7601-SP1'
platform.processor()
'Intel64 Family 6 Model 60 Stepping 3, GenuineIntel'
platform.python_version()
'3.6.3'

This is almost identical (except the Python sub-sub-version - should this make any difference?) and so I'm clueless as to what prevents the wheel installation on the target system.

Elazar
  • 20,415
  • 4
  • 46
  • 67
Gadi A
  • 3,449
  • 8
  • 36
  • 54
  • 1
    Did you try all answers here: https://stackoverflow.com/questions/28568070/filename-whl-is-not-supported-wheel-on-this-platform – Janne Karila Oct 19 '18 at 07:04
  • Thank you. I attempted some of them, but not all. I am trying now the "all-none" workaround and checking whether Python itself is 32 or 64 bits (I did not realize the "AMD64" referred to the Python version and not the CPU). – Gadi A Oct 19 '18 at 07:11
  • 1
    See also https://docs.python.org/3/library/platform.html#platform.architecture – Janne Karila Oct 19 '18 at 07:15

0 Answers0