When switching over to a new MacBook with an M1 Apple Silicon chip, I noticed that many python packages I use daily are not compatible with M1 chips. Sometimes there was just no prebuilt wheel, or there were still bugs in the code not allowing the package to build at all. So I decided to create drop-in replacement packages with prebuilt wheels for the Apple Mac M1 (Apple Silicon / arm64).
Every package contains a build script to automatically build it in your own enviroment and a Github CI workflow to build it on Github (if possible).
Here you find a list of all the prebuilt packages. Sometimes the official maintainer have updated their binaries too, so please first check if there is an official build ready for M1.
A librealsense2 python wrapper built for all modern MacOSX versions (intel / silicon) because Intel does only support MacOS High Sierra officially. This build runs on M1 but it could be that you have to run your script with sudo.
pip install pyrealsense2-macosx
For requirements.txt files use the following snippet:
pyrealsense2; platform_system == "Windows" or platform_system == "Linux"
pyrealsense2-macosx; platform_system == "Darwin"
The onnxruntime is ready to be built on MacOS M1 but there are no PyPi hosted packages at the moment. So I prebuilt the wheels and published them. This is currently not built with ML Core support.
pip install onnxruntime-silicon
For requirements.txt files use the following snippet:
onnxruntime; platform_system == "Windows" or platform_system == "Linux"
onnxruntime; platform_system == "Darwin" and platform.machine != "arm64"
onnxruntime-silicon; platform_system == "Darwin" and platform.machine == "arm64"
Prebuilt openvino python package with the openvino arm cpu extension for MacOS. In comparison to the other packages, this one does not contain all the features the official package offers. It is a special build and only supports FP32
models.
pip install openvino-arm
For requirements.txt files use the following snippet:
openvino; platform_system == "Windows" or platform_system == "Linux"
openvino; platform_system == "Darwin" and platform.machine != "arm64"
openvino-arm; platform_system == "Darwin" and platform.machine == "arm64"
Google MediaPipe prebuilt for M1 which runs perfectly fine on a Mac M1 (reaching 24 FPS for pose detection with ease).
pip install mediapipe-silicon
For requirements.txt files use the following snippet:
mediapipe; platform_system == "Windows" or platform_system == "Linux"
mediapipe; platform_system == "Darwin" and platform.machine != "arm64"
mediapipe-silicon; platform_system == "Darwin" and platform.machine == "arm64"
MIT License - Copyright (c) 2022 Florian Bruggisser