Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 49 additions & 1 deletion docs/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ macOS

Close and re-open the terminal window after this command.

The script also works on M1 Macs, Homebrew being installed under Rosetta 2, as some Python packages are still missing native M1 support. In case you already have Homebrew installed natively and things don't work, see `here <https://github.com/luxonis/depthai/issues/299#issuecomment-757110966>`__ for some additional troubleshooting steps.
The script also works on M1 Macs, Homebrew being installed under Rosetta 2, as some Python packages are still missing native M1
support. In case you already have Homebrew installed natively and things don't work, see `here <https://github.com/luxonis/depthai/issues/299#issuecomment-757110966>`__
for some additional troubleshooting steps.

Note that if the video streaming window does not appear consider running the
following:
Expand All @@ -57,6 +59,52 @@ following:

See the `Video preview window fails to appear on macOS <https://discuss.luxonis.com/d/95-video-preview-window-fails-to-appear-on-macos>`_ thread on our forum for more information.

M1 Mac build wheels natively
----------------------------

In order to run DepthAI natively on M1 Mac, you currently need to build the wheels locally. We will add pre-building M1 wheels
in Q2 of 2022, so this won't be needed anymore.

This tutorial was provided by whab and tested on a MacBookPro M1 Pro running macOS Monterey 12.1 with a OAK-D-Lite.

.. code-block:: bash

# Install native M1 version of brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

# Install conda to create virtual environments for Python
brew install --cask miniconda
conda init zsh

# Close and re-open a Terminal window

# Install DepthAI by building a M1 wheel (inside ~/DepthAI/)
conda create --name DepthAIEnv39 python=3.9
conda activate DepthAIEnv39
python3 -m pip install -U pip
brew update
brew install cmake libusb
cd ~; mkdir DepthAI; cd DepthAI
git clone --recursive https://github.com/luxonis/depthai-python.git
cd depthai-python
mkdir build && cd build
# Build depthai-python
cmake ..
cmake --build . --parallel
cd ..
python3 -m pip wheel . -w wheelhouse
pip install wheelhouse/depthai-*

# Test DepthAI with a OAK plugged to your new M1 Mac
cd examples
nano install_requirements.py
# Remove code of block (3 lines) starting with: if thisPlatform == "arm64" and platform.system() == "Darwin":
# Remove code of block (48 lines) starting with: if not args.skip_depthai:
Comment on lines +103 to +104
Copy link
Collaborator

@themarpe themarpe Mar 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should get the fix in instead of this...
(got a branch for this, will open a PR tomorrow)

EDIT: I'll address when GitHub M1 Runner support is out...

python3 install_requirements.py
python3 ColorCamera/rgb_preview.py

Ubuntu
******

Expand Down