Question

We've rented a M1 Mac Mini at a Cloud provider and installed python3 via homebrew.

However, when installing packages, we see many errors reporting wrong architecture mismatches.

pip3 install <something>

/private/var/folders/s9/94x83w5x5gv1tkw6pgcvy55r0000gn/T/pip-install-6zb2vf39/rchitect_2226cf31d84b4fbeb14084a47e566d22/.eggs/cffi-1.14.5-py3.9-macosx-11.4-arm64.egg/_cffi_backend.cpython-39-darwin.so: mach-o, but wrong architecture

Other CLI libraries work just fine with their (native) brew installations. Rosetta is not even installed.

I am not heavily into Python and searching the web did not help, hence I suspect something non-standard might be going on here.

brew info python3
python@3.9: stable 3.9.5 (bottled)
Interpreted, interactive, object-oriented programming language
https://www.python.org/
/opt/homebrew/Cellar/python@3.9/3.9.5 (3,108 files, 55.5MB) *
  Poured from bottle on 2021-05-27 at 20:07:29
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/python@3.9.rb
License: Python-2.0

which python3
/opt/homebrew/bin/python3

Does anyone have a clue what might be going on?

Edit: Here are the architectures of the files

file /opt/homebrew/bin/python3
/opt/homebrew/bin/python3: Mach-O 64-bit executable arm64

file /private/var/folders/s9/94x83w5x5gv1tkw6pgcvy55r0000gn/T/pip-install-nq_w_w15/rchitect_e1cd9cd747dc44e2a7f69885db619a02/.eggs/cffi-1.14.5-py3.9-macosx-11-arm64.egg/_cffi_backend.cpython-39-darwin.so: Mach-O 64-bit bundle x86_64

The downloaded egg of cffi is the wrong architecture. Why is this happening and who might be the bad player here?

Was it helpful?

Solution

Pypi does not provide an ARM package for this software for macOS. Only X86_64.

How do I know?

I actually went and looked.

https://pypi.org/project/cffi/#files

Licensed under: CC-BY-SA with attribution
Not affiliated with apple.stackexchange
scroll top