- Edited
Hi!
I have been working on refactoring the current DepthAI library and Python bindings. This effort turned out to also provide a solid ground to try compiling the library on Windows.
Thanks to CMake and their awesome cross-platform support the whole endeavor didn't take much more than a couple of hours.
If you would like to give it a try and have Python 3.7 64-bit currently installed on the system, go ahead and checkout "refactor" branch of depthai repository:
git clone https://github.com/luxonis/depthai.git --branch refactor --single-branch
Then its off to running python depthai.py
as usual.
If on the other hand you would like to dive in and try compiling it yourself then feel free to follow the instructions bellow (Tested generators: Visual Studio 16 2019 and Visual Studio 15 2017):
Note: Windows PowerShell was used
- Clone depthai-api repository and checkout refactor branch
git clone https://github.com/luxonis/depthai-api.git --branch refactor --single-branch --recursive
- Enter the directory and create a build folder
cd depthai-api
mkdir build
cd build
- Configure with CMake (Note: Configure step also downloads dependencies, so it might take a while on first run)
- To specify generator run cmake .. -G to retrieve possible generators
- If you have 64-bit Python installed specify -A x64 otherwise leave it out
cmake .. -G"[specify which generator]" [-A x64] -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="$pwd\..\cmake\ToolchainConfig.cmake"
- Build
cmake --build . --parallel --config Release
The resulting Python wheel will be in Release folder. Copy it over to depthai folder from before and try running the
python depthai.py
with the new wheel.
Best of luck!