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 https://github.com/NVIDIA-AI-IOT/deepstream_python_apps.git
cd deepstream_python_apps/
git submodule update --init
sudo apt-get install --reinstall ca-certificates
cd 3rdparty/gst-python/
git checkout 1a8f48a
./autogen.sh PYTHON=python3
./configure PYTHON=python3
make
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
make
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 deepstream_test_1.py ../../../../samples/streams/sample_qHD.h264