DepthAI Python Library
Project description
DepthAI Python Library
Python bindings for C++ depthai-core library
Documentation
Documentation is available over at Luxonis DepthAI API
Installation
Prebuilt wheels are available in Luxonis repository Make sure pip is upgraded
python3 -m pip install -U pip
python3 -m pip install --extra-index-url https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/ depthai
Building from source
Dependencies
- cmake >= 3.4
- C++14 compiler (clang, gcc, msvc, ...)
- Python
Along these, dependencies of depthai-core are also required See: depthai-core dependencies
Building
To build a shared library from source perform the following:
mkdir build && cd build
cmake ..
cmake --build . --parallel
To build a wheel, execute the following
python3 -m pip wheel . -w wheelhouse
Tested platforms
- Windows 10
- Ubuntu 16.04, 18.04;
- Raspbian 10;
- macOS 10.14.6, 10.15.4;
Troubleshooting
Relocation link error
Build failure on Ubuntu 18.04 ("relocation ..." link error) with gcc 7.4.0 (default) - issue #3
-
the solution was to upgrade gcc to version 8:
sudo apt install g++-8 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 70 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 70
Hunter
Hunter is a CMake-only dependency manager for C/C++ projects.
If you are stuck with error message which mentions external libraries (subdirectory of .hunter
) like the following:
/usr/bin/ld: /home/[user]/.hunter/_Base/062a19a/ccfed35/a84a713/Install/lib/liblzma.a(stream_flags_decoder.c.o): warning: relocation against `lzma_footer_magic' in read-only section `.text'
Try erasing the Hunter cache folder.
Linux/MacOS:
rm -r ~/.hunter
Windows:
del C:/.hunter
or
del C:/[user]/.hunter
LTO - link time optimization
If following message appears:
lto1: internal compiler error: in add_symbol_to_partition_1, at lto/lto-partition.c:152
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-10/README.Bugs> for instructions.
lto-wrapper: fatal error: /usr/bin/c++ returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/depthai.dir/build.make:227: depthai.cpython-38-x86_64-linux-gnu.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:98: CMakeFiles/depthai.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
One fix is to update linker: (In case you are on Ubuntu 20.04: /usr/bin/ld --version
: 2.30)
# Add to the end of /etc/apt/sources.list:
echo "deb http://ro.archive.ubuntu.com/ubuntu groovy main" >> /etc/apt/sources.list
# Replace ro with your countries local cache server (check the content of the file to find out which is)
# Not mandatory, but faster
sudo apt update
sudo apt install binutils
# Should upgrade to 2.35.1
# Check version:
/usr/bin/ld --version
# Output should be: GNU ld (GNU Binutils for Ubuntu) 2.35.1
# Revert /etc/apt/sources.list to previous state (comment out line) to prevent updating other packages.
sudo apt update
Another option is to use clang compiler:
sudo apt install clang-10
mkdir build && cd build
CC=clang-10 CXX=clang++-10 cmake ..
cmake --build . --parallel
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for depthai-2.0.0.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6fe0c0100cb28009fdf193d770a0f03a5ad1e9e21db550ac7605aadb3001e72 |
|
MD5 | acdd126c48cd4407124c67a182d7deb1 |
|
BLAKE2b-256 | 344ec94cd0bd4c20c42e13e1b4604141d75b3576cff335d33be33ff52a1dda11 |
Hashes for depthai-2.0.0.1-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8a7c10bed035ff5420c184bba1326745bd1b49438eff2bb7594c903b8eea92a |
|
MD5 | 82e451c5ecfe97a1b47875d6f35c45ef |
|
BLAKE2b-256 | 43b46ad02a14387a98d0b9fdbde240d3c15de5d63ea3da717a8a03dc45438f9d |
Hashes for depthai-2.0.0.1-cp39-cp39-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe8a3ae92cec3e5241b7854dcffab41125ba473d2d1198b047c87ecdc1ba3c0d |
|
MD5 | 253c30ba34a9cea0c73f0a7735d78414 |
|
BLAKE2b-256 | dae29d5d5303b87a4616b7b7301046c01afebeb1a4f05b7815b1d9d635be1d88 |
Hashes for depthai-2.0.0.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3ae782604bb4385ea3ff465c8618019df0f17b10605b0e59c5c6ab64ed07806 |
|
MD5 | eeec03ac01475385edf8adf502d1441e |
|
BLAKE2b-256 | a3656738a4392f917c96d68233443afa244bc72f350a513c1718ff46765e2220 |
Hashes for depthai-2.0.0.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | baed0850ead781777d316600e7881d8b1f1f9f7b9c04348f78324709eff432ca |
|
MD5 | b26dca0380ce4700b3d53aaa8b622bea |
|
BLAKE2b-256 | d2bf63bd26e8c7f631393beb118ac3366207e0cac2f64051b80c658267366884 |
Hashes for depthai-2.0.0.1-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2a8f852466200230b71813928473dda210a7b1296ae1f75a4180138713adf49 |
|
MD5 | 903f0f5a1767b6a4c5f2e434ef1dd9f8 |
|
BLAKE2b-256 | 5d66b509fe3642bb82070482df242db434ec367fc092d78f1aa53058fa5b90de |
Hashes for depthai-2.0.0.1-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9991a7fdcd6d5d33eb31c8cb851919737c03bc9371b5a283fa98c7eede064d44 |
|
MD5 | 2c1dcd136d9629ddedcb343adf7e7e12 |
|
BLAKE2b-256 | 322ea6d67019ce33a7a24b092eda41501ca78370f866b2cb3a7a0e85302424fa |
Hashes for depthai-2.0.0.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60245f397fe62bd559f9c905c501f3fed455e76263126f74ecc3b163671da523 |
|
MD5 | 3b1ee610807513238d1984f2318425e1 |
|
BLAKE2b-256 | a9258915e1b3d80c9e9173fe2849f5c52cf0d0d1b8d7760d286f9fdb76d01092 |
Hashes for depthai-2.0.0.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9972fedb83b9d40fff770f51032b13ee2a8b60f4e0e9bdfee0eb982aa8252d07 |
|
MD5 | 4a7ee866bed6a4313598f6ef5e10f106 |
|
BLAKE2b-256 | efc9515ea3bfb61b47930f392c70289757774f9f62af895e81e5f2fb912bfc6a |
Hashes for depthai-2.0.0.1-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 898120ab2dd2b72d0c3f31bb402b92a90250a8eb886e676deb8d21ad644442cf |
|
MD5 | f26d412c29de303dc784a4b8f2fb56d6 |
|
BLAKE2b-256 | 8bd431db23c30864bc86252ff8bdcdcae8de6cd3b13af5c32c92586631b1a222 |
Hashes for depthai-2.0.0.1-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c183c4cf0df30407993780d2f52f63745d039cdde9c54fa8174bb3d271eb4a49 |
|
MD5 | 1a82df833557ac0699e679ea7c118a58 |
|
BLAKE2b-256 | d4fa6d7fba40b72167d0f56d0c439b02ca9337dc296e0ff87247af9e6df1aeaf |
Hashes for depthai-2.0.0.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08630b059556d77818af9891df078c68464ff304505755914d58e99beded4511 |
|
MD5 | c4d878f3257793df64366fba22d2a1ae |
|
BLAKE2b-256 | bb01f683fa5b7db55b202007ad9fcd09334c503a9790d28772371db314056314 |
Hashes for depthai-2.0.0.1-cp37-cp37m-linux_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09651ae5a72876fc9cf5211b512abe7e4fe761b76c85560873ca22146fa023c7 |
|
MD5 | 48dd2949191ff3166830db643103da42 |
|
BLAKE2b-256 | 0ea8a019235ff8755cae767909623d4468bd038a62cb95fdff6ef18bf35e5dbe |
Hashes for depthai-2.0.0.1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6edb5c91db6b02fb646597d0d94ed9c028fe3bb61482eb4e88d5318641c27a2a |
|
MD5 | 565e3062fe5056f21266481becfbcbd5 |
|
BLAKE2b-256 | ba47c1a6879af45d77078d7707996366522f81b9aef8a8441ed85f72204576bf |
Hashes for depthai-2.0.0.1-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43d0470732e3a5398231b25776f5aab3a5ec1bdd1acf5f8cd8587670a545d3f3 |
|
MD5 | 900dfc8a80224d0a803fc152c13f6008 |
|
BLAKE2b-256 | 4b36fb7f68aaeba3d75ffbf7720374cb7681442e2a3e458d3ac7d72213ef6a72 |
Hashes for depthai-2.0.0.1-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1642afdac319cee35c33a0a4011db367f57db6b881b6a77a94d7e3bc86538f9d |
|
MD5 | 047de76b97083ab0226b585486aaf784 |
|
BLAKE2b-256 | c28b9d09cc35e007bee4e4f6c8afce80157973a537d16aba8454abd6cf656753 |
Hashes for depthai-2.0.0.1-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee0277ad8a51e7e035f08cbb34eb4a0ff2bc806ff6b16f11e51522d270567ea8 |
|
MD5 | 23ff42e98428f103928108212ef9fc36 |
|
BLAKE2b-256 | 64b4218a18543e9fadfac91f40a4e285d4f07560b9cc402c9f21215f5af2647e |
Hashes for depthai-2.0.0.1-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13e1be7784be298e01d0ff9e6464b41c2f27c5a1c9d7afebab279078f7f919dd |
|
MD5 | 9a1270fb250b4b2717b9a1adc13f332c |
|
BLAKE2b-256 | eb25e41546999a78f26d9aab384c012c46dfc6b3bc4e6cb714222260fc32af19 |
Hashes for depthai-2.0.0.1-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e539a397e6eaf92741d1aeac90944453d83bc2881414cf292fc4989a894898f |
|
MD5 | 6ad8fade0c6ddc38569e59d925923b45 |
|
BLAKE2b-256 | 838462814aa9941bb59ba9f3db16c8d8cf12eb5b3fdc17b37be6e0278ae24791 |
Hashes for depthai-2.0.0.1-cp35-cp35m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30fbc8271d3190832e9db027f486ab118acf12af2e210704a6e28d0a2f3b01cf |
|
MD5 | f586d7175d9e89112096aa2b952bbec2 |
|
BLAKE2b-256 | 0acec93164c4aaee10a74870484d6104d7bd30901986d254a2f4572555dd3fb5 |
Hashes for depthai-2.0.0.1-cp35-cp35m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79613e6f956d7de6f6ae09bb2598507e47474abb7a275d6d39c1d39d2c38dc7e |
|
MD5 | b13f7ae05dcbc8add74a138553095ece |
|
BLAKE2b-256 | 3c3366a59fa503f5cd442811d8bdaa967fbe518aae347ccb6c83ee9356820deb |