1

I am build a .whl package on my MacOS Ventura13.4 (x86_64 platform)

python setup.py bdist_wheel
pip install dist/my_file.whl

Error text:

*.whl is not a supported wheel on this platform

How to fix the error?

My versions:

python3.7.0 (need this version)
pip 23.1.2
pybind 2.9.1 (need this version)
setuptools 39.0.1
wheel 0.40.0

Python was installed from official site: (macOS 64-bit installer)

Update Found out that the problem deals with python3.7.0, because there are no errors for python 3.8

What is wrong with python3.7 ?

mascai
  • 1,373
  • 1
  • 9
  • 30
  • 2
    What is the name of the `.whl` file?. It matters. See the PEP 427 [file name convention](https://peps.python.org/pep-0427/#file-name-convention). Also, [this question](https://stackoverflow.com/questions/41645540/how-to-interpret-naming-convention-in-pypi-package-name). – Axe319 Jun 07 '23 at 15:32
  • wrapper-1.0.1-cp37-cp37m-macosx_13_0_intel.whl – mascai Jun 07 '23 at 15:41
  • 1
    Does `python -m pip install dist/wrapper-1.0.1-cp37-cp37m-macosx_13_0_intel.whl` give the same error? – Axe319 Jun 07 '23 at 16:31
  • @Axe319 yes, the same error – mascai Jun 07 '23 at 17:53

1 Answers1

1

Try changing the filenames OS version to 13_4 E.g. wrapper-1.0.1-cp37-cp37m-macosx_13_4_intel.whl

instead of wrapper-1.0.1-cp37-cp37m-macosx_13_0_intel.whl

It's possible the version of MacOS doesn't actually match the version recognised by python. See this Stackoverflow post:

ERROR: (wheel).whl is not a supported wheel on this platform

HarryP2023
  • 298
  • 1
  • 13