Skip to content

Tag macosx_10_9_universal2 not accepted when running native arm64 (on macOS 11) #379

@rluce

Description

@rluce

Environment

  • MacBook Pro with M1 chip
  • Released Python 3.9.1 universal2 installer
  • Latest pip, setuptools and wheel

Description

Running the arm64 portion of Python 3.9.1 to install a universal2 binary wheel ("macosx_10_9_universal2" is the default tag) fails. On contrary, using the x86_64 portion of the very same binary the installation succeeds. For me the expected behaviour is that such wheels can be installed with both the arm64 and x86_64 portions on macOS 11.

The offending portion that pip rejects is the 10_9 part. If I manually rename this portion of the wheel file to 11_0, the installation succeeds. Again, for me the expected behaviour is that such wheels can be installed on macOS 11

What did you want to do?

Install a universal2 binary wheel on macOS 11 using Python 3.9.1. Simplified setup using a dummy wheel:

% touch asdf-1.0.0-cp39-cp39-macosx_10_9_universal2.whl 
% python -m pip install asdf-1.0.0-cp39-cp39-macosx_10_9_universal2.whl 

Output

ERROR: asdf-1.0.0-cp39-cp39-macosx_10_9_universal2.whl is not a supported wheel on this platform.

Additional information

Using the x86_64 portion, the wheel tag is accepted (and we get the expected error from using a dummy wheel):

% arch -x86_64 python -m pip install asdf-1.0.0-cp39-cp39-macosx_10_9_universal2.whl
Processing ./asdf-1.0.0-cp39-cp39-macosx_10_9_universal2.whl
[ ... ]
zipfile.BadZipFile: File is not a zip file

Version of the interpreter, showing that the system platform matches the wheel tag:

(Python 3.9.1 (v3.9.1:1e5d33e9b9, Dec  7 2020, 12:44:01) 
[Clang 12.0.0 (clang-1200.0.32.27)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sysconfig; sysconfig.get_platform()
'macosx-10.9-universal2'

Version of installed packages:

pip        21.0.dev0
setuptools 51.1.1
wheel      0.36.2

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions