Hi there! I've tried the latest version of the mac_arm64_wheels
branch of depthai-python
, and this seems to work with the rgb_preview.py
demo ️
Running DepthAI on Apple M1 Based Macs
Additional detail: Somehow the cmake build seems to have had an error,
[ 90%] Building CXX object CMakeFiles/depthai.dir/src/DatatypeBindings.cpp.o
[ 91%] Building CXX object CMakeFiles/depthai.dir/src/DataQueueBindings.cpp.o
[ 93%] Building CXX object CMakeFiles/depthai.dir/src/pipeline/PipelineBindings.cpp.o
[ 94%] Building CXX object CMakeFiles/depthai.dir/src/pipeline/NodeBindings.cpp.o
[ 95%] Building CXX object CMakeFiles/depthai.dir/src/pipeline/CommonBindings.cpp.o
[ 96%] Building CXX object CMakeFiles/depthai.dir/src/pipeline/AssetManagerBindings.cpp.o
[ 97%] Building CXX object CMakeFiles/depthai.dir/src/openvino/OpenVINOBindings.cpp.o
[ 98%] Building CXX object CMakeFiles/depthai.dir/src/log/LogBindings.cpp.o
[100%] Linking CXX shared module ../lib.macosx-11.0-arm64-cpython-39/depthai.cpython-39-darwin.so
/opt/miniconda3/envs/depthai/bin/python: can't open file '/private/var/folders/1j/gpklsypn4vv3d9y9b1tql2d00000gn/T/pip-install-mpgqbpst/depthai_9c8da360e87141588cae8490ac54bc56/generate_stubs.py': [Errno 2] No such file or directory
make[2]: *** [../lib.macosx-11.0-arm64-cpython-39/depthai.cpython-39-darwin.so] Error 2
make[2]: *** Deleting file `../lib.macosx-11.0-arm64-cpython-39/depthai.cpython-39-darwin.so'
make[1]: *** [CMakeFiles/depthai.dir/all] Error 2
Nevertheless, the script continued and it seems to have succeeded in getting everything going correctly :shrug:
- Edited
Hi all, I've just received my OAK-D Pro and I'm wondering whats now the "gold standard" to run DepthAI (Python) on a Silicon-based Mac? Is it the approach discussed here or is there now a "Out-of-the-Box"-approach for DepthAI-SDK?
I did this and was able to run the rgb_preview script. How do I then install the depthai-sdk and run the demo_script?
Hi jonas ,
We haven't yet released native wheels for M1, so we would suggest using Rosetta 2 (docs: Installation docs).
Thanks, Erik
Thanks erik... I've actually managed to run everything with native modules, including the gen2-experiments and the depthai-demo application. Even Qt does its job.
The tricky part is to have the correct version of depthai-sdk. The official demo and most of the gen2-experiments work if I directly install the version from the current depthai git repo. You must not run the install requirements scripts, because they usually reinstall stuff you don't want. I've just installed the missing dependencies manually.
Thus, I'm currently very happy and looking forward to develop my own stuff. Thanks for everything so far!
This is what worked for me:
- Open a terminal, navigate to
depthai-python folder
- Execute
git checkout mac_arm64_wheels
- Execute
python examples/install_requirements.py
python -mpip install --extra-index-url https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/ depthai==2.16.0.0.dev0+fc472bd13f9c853148e7a35fc956f4bc0dbf49ae
- Execute
python examples/ColorCamera/rgb_preview.py
Trying to get depth-ai running without having to install Rosetta, I git cloned depthai-python but get the following error upon checking out Mac_arm_wheels branch as suggested above:
error: pathspec 'mac_arm64_wheels' did not match any file(s) known to git
erik When following the getting started tutorial, I get the following:
~/ml/de/depthai main python3 install_requirements.py 42 ✘ oak 09:16:10 pm
pip 22.3 from /Users/stan/.conda/envs/oak/lib/python3.9/site-packages/pip (python 3.9)
Traceback (most recent call last):
File "/Users/stan/ml/depthai/depthai/install_requirements.py", line 32, in <module>
raise RuntimeError(err_str)
RuntimeError: There are no prebuilt wheels for M1 processors. Please open the following link for a solution - https://discuss.luxonis.com/d/69-running-depthai-on-apple-m1-based-macs
Also after pip install depthai
first on the env.