Deepstream Python 1.1.0 Installation Steps are so complex

Hi Sir/Madam:

I am currently trying to install Deepstream Python 1.1.0 on Jetson NX dev kit.
So, I have already installed Deepstream 6.0 and it works.

I tried to follow the guidance on official github page, but I am getting confused. Several steps I don’t quite understand. I am wondering whether you can help.

On the page of HOW-TO, I tried to follow the steps inside.

There’s no problem of the pre-request session:

   $ sudo apt-get install python-gi-dev
   $ export GST_LIBS="-lgstreamer-1.0 -lgobject-2.0 -lglib-2.0"
   $ export GST_CFLAGS="-pthread -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include"
   $ git clone
   $ cd gst-python
   $ git checkout 1a8f48a
   $ ./ PYTHON=python3
   $ ./configure PYTHON=python3
   $ make
   $ sudo make install

This part is same as the former versions.

But I started getting refused from next step.

Under the Deepstream python bindings step, here’s the webpage.
In step 2.2 Initialization of submodules. I don’t quite understand submodules you mean. After several times try, I guess I first need to clone deepstream_python_apps repo, and then do the git submodule update --init inside.

Next problem I found is, since I am located in mainland of China, git clone is usually not stable. So git submodule update --init always have problem.

Third problem: Now, I follow the step: Installing Gst-python. I remember that in the pre-request step, I have already installed Gst-python, I don’t quite understand why. But I am getting confused.
Then next step 2.4 - Deepstream SDK shows to install Deepstream SDK. I have already installed, but the steps of installation is like in reverse order. In most cases, people first install Deepstream SDK.

Now after I build the bindings with the following commends,

cd deepstream_python_apps/bindings
mkdir build
cd build
cmake ..

I tried to run an python example but get failed, because system cannot find pyds. (I have already add the path).
In Deepstream 5.0, I see is located in .../Deepstream5,0/lib/ folder, but here I searched for folder, it is located in ...deepstream_python_apps/bindings/build and ...deepstream_python_apps/bindings/build/build/lib

Haha, I am confused again.

Now, I move back to HOW-TO page, with the section Running Sample Applications. The first sentence confused me again: Clone the deepstream_python_apps repo under <DeepStream 6.0 ROOT>/sources: git clone

So, I have already cloned this repo in build python binding step…

I am wondering whether you can help to make clear what exactly each step should be done to make Deepstream Python works, and make it simple. Cus, I mainly focus on using it, but has less knowledge of principles behind.

Thank you so much for your help.

Does below FAQ help?

1 Like

This is perfect! Sorry that I missed it. Many thanks to you.

I tried to make some change based on the link above, since I directly install deepstream python in NX device, as followed:

## 1.  Prerequisites
sudo apt-get update
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

# 2. Gst-python
cd /opt/nvidia/deepstream/deepstream-6.0/sources/apps/
git clone
cd deepstream_python_apps/
git submodule update --init
sudo apt-get install --reinstall ca-certificates
cd 3rdparty/gst-python/
git checkout 1a8f48a
./ PYTHON=python3
./configure PYTHON=python3
sudo make install

# 3. install pyds
cd ../../bindings/
mkdir build
cd build
cmake ..  -DPYTHON_MAJOR_VERSION=3 -DPYTHON_MINOR_VERSION=6 -DPIP_PLATFORM=linux_aarch64 -DDS_PATH=/opt/nvidia/deepstream/deepstream
sudo pip3 install ./pyds-1.1.0-py3-none-linux_aarch64.whl

# 4. run sample
cd ../../deepstream_python_apps
mv  apps/* ./
cd deepstream-test1/
python3 ../../../../samples/streams/sample_qHD.h264

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