Compiling Deepstream 6.0 Python Bindings: pybind11.h: No such file or directory

I am trying to compile Deepstream 6.0 Python bindings:

sudo apt install -y git python-dev python3 python3-pip python3.6-dev python3.8-dev cmake g++ build-essential \
    libglib2.0-dev libglib2.0-dev-bin python-gi-dev libtool m4 autoconf automake
sudo apt-get -y install pybind11-dev
git clone https://github.com/NVIDIA-AI-IOT/deepstream_python_apps.git
cd deepstream_python_apps
git checkout v1.1.0
cd bindings
mkdir build
cd build
cmake ..
make

I encounter the error:

ubuntu@ip-x-x-x-x:~/pycharm/libs/deepstream_python_apps/bindings/build$ cmake ..
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/pycharm/libs/deepstream_python_apps/bindings/build
ubuntu@ip-x-x-x-x:~/pycharm/libs/deepstream_python_apps/bindings/build$ make
Scanning dependencies of target pyds
[  6%] Building CXX object CMakeFiles/pyds.dir/src/pyds.cpp.o
In file included from /home/ubuntu/pycharm/libs/deepstream_python_apps/bindings/include/bind/bindanalyticsmeta.hpp:23:0,
                 from /home/ubuntu/pycharm/libs/deepstream_python_apps/bindings/src/pyds.cpp:19:
/home/ubuntu/pycharm/libs/deepstream_python_apps/bindings/include/pyds.hpp:22:10: fatal error: pybind11.h: No such file or directory
 #include <pybind11.h>
          ^~~~~~~~~~~~
compilation terminated.
CMakeFiles/pyds.dir/build.make:62: recipe for target 'CMakeFiles/pyds.dir/src/pyds.cpp.o' failed
make[2]: *** [CMakeFiles/pyds.dir/src/pyds.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/pyds.dir/all' failed
make[1]: *** [CMakeFiles/pyds.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

If I look for pybind11.h I can find it in:

/usr/include/pybind11/pybind11.h
2 Likes

please refer to Python Sample Apps and Bindings Source Details — DeepStream 6.0 Release documentation to install Gst Python

I installed Gst Python as indicated in that link, even thought that link is meant for Jetsons, while I am using a T4.
I still have the same errors. It seems that make cannot find pybind11.h. It doesn’t look related to gstreamer.

1 Like

I have the same problem on my PC as well and I couldn’t figure it out for days. Deepstream 6.0 , ubuntu 18.04

Same, Deepstream 6.0, Ubuntu 18.04. I am working on an EC2 with a T4.

Can you please add the setup info as other topics?

You mean opening another thread?

I mean, please provide the setup info like below

• Hardware Platform (Jetson / GPU) : Jetson nano
• DeepStream Version : 6.0.0
• JetPack Version (valid for Jetson only) Jetpack 4.6
• TensorRT Version 8.0.1
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs) : Questions

Here: Compiling Deepstream 6.0 Python Bindings: pybind11.h: No such file or directory

please refer to Compiling Deepstream 6.0 Python Bindings: pybind11.h: No such file or directory - #3 by mchi

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.