Skip to content

More information about *why* a wheel is not supported on a given platform #10793

Description

@NAThompson

What's the problem this feature will solve?

I maintain a set of wheel files with Python extension modules. Hence the binaries are Python version intolerant, OS version intolerant, and CPU architecture intolerant. I do not maintain all combinations of all platforms, Python versions, and CPU architecture.

Hence I often receive the following bug report:

ERROR: foo-1.2.0-cp39-cp39-macosx_12_0_x86_64.whl is not a supported wheel on this platform.

I have identified five separate causes for this error:

  • Using pip associated with python3.8 (wrong interpreter)
  • Trying to installing on Linux (wrong OS)
  • Trying to installing on MacOS Big Sur, instead of Monterrey (wrong OS version)
  • Trying to installing on M1 (wrong CPU architecture)
  • Trying to install a debug wheel with a release Python virtualenv (wrong debug)

Describe the solution you'd like

When the error is reported, it would be helpful to be given information about why the wheel is unsupported. For example,

$ python3.8 -m pip install  foo-1.2.0-cp39-cp39-macosx_12_0_x86_64.whl

Should yield the following error:

ERROR: Wheel file `foo-1.2.0-cp39-cp39-macosx_12_0_x86_64.whl` requires Python3.9, but attempting to install it with Python3.8.

If the architecture is M1, then

$ python3.9 -m pip install  foo-1.2.0-cp39-cp39-macosx_12_0_x86_64.whl

should yield the error

ERROR: Wheel file foo-1.2.0-cp39-cp39-macosx_12_0_x86_64.whl targets x86, but this platform is ARM.

Alternative Solutions

I have not tried alternative solutions; moreover I confess that this might be a feature request against wheel.

Additional context

This stackoverflow post shows that other people would also like to know why a wheel is not supported.

Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions