luxonis/depthai-python
DepthAI Python Library
What it solves
This project gives Python developers a way to use the depthai-core library, which is written in C++. Instead of writing C++ code, you can call that library's functionality from Python. Note that this README covers the v2.x branch; in the newer v3.x version, the Python bindings were moved directly into the depthai-core repository itself.
How it works
It is a set of Python bindings layered on top of the C++ depthai-core library. You can get it two ways:
- Install a prebuilt wheel with
pip, pulling from the Luxonis package repository (make sure pip is upgraded first). - Build from source, which requires CMake (>= 3.4), a C++14 compiler (clang, gcc, msvc, etc.), Python 3, and the dependencies of depthai-core. The repository uses git submodules that must be initialized and updated. You can build via
pip install ., produce a wheel withpip wheel, or build a shared library directly with CMake.
Tests and examples can be enabled at build time and run with ctest.
Who it's for
Python developers who want to use the depthai-core library and prefer Python over C++. The project is tested on Windows 10/11, Ubuntu 18.04/20.04/22.04, Raspbian 10, and macOS 10.14.6/10.15.4. Prebuilt ARM64 wheels and Docker images are provided; automated ARM32 builds were discontinued for v2.
Highlights
- Prebuilt wheels installable directly with
pipfrom the Luxonis repository - Multiple build paths: pip install, wheel building, or a shared library via CMake
- Tested across Windows, Ubuntu, Raspbian, and macOS
- Includes tests and examples runnable via
ctest, with configurable timeouts - Documentation available online and buildable locally (via Docker or on Linux)
- Troubleshooting guidance for common build issues (Hunter cache, LTO linker errors, missing libusb, etc.)
Related
- Project
- Project
- Project
- Project
- Project