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:
- 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")?
- What is the complete set of parameters pip checks for a target wheel and platform to determine compatibility?
- 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.