# Deepstreem installation fails

**URL:** <https://forums.developer.nvidia.com/t/deepstreem-installation-fails/229454>\
**Category:** DeepStream SDK\
**Tags:** gstreamer, python\
**Created:** [September 30, 2022, 7:32am UTC](https://forums.developer.nvidia.com/t/deepstreem-installation-fails/229454 "2022-09-30T07:32:43Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![magnus.gabell](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@magnus.gabell](https://forums.developer.nvidia.com/u/magnus.gabell)\
**Post date:** [September 30, 2022, 7:32am UTC](https://forums.developer.nvidia.com/t/deepstreem-installation-fails/229454/1 "2022-09-30T07:32:44Z")

</div>

Please provide complete information as applicable to your setup.

**• Hardware Platform (Jetson / GPU)** Jetson Orin  
**• DeepStream Version** Latest  
**• JetPack Version (valid for Jetson only)** Latest  
**• TensorRT Version** Latest  
\*\*• NVIDIA GPU Driver Version (valid for GPU only)\*\*Latest  
**• Issue Type( questions, new requirements, bugs)**  
The installation of Deepstream on my Orin work according to the SDK Manager.  
When trying to run the test sample for USB input I get Pyds import error. So after reading about that (which is not stated in the prerequisites) I found the setup.py to install it. Still not working.  
Before I loose my nerve and ranting too much. I would love some support on this matter.

Tried: pip install pyds  
equirement already satisfied: pyds in /usr/local/lib/python3.8/dist-packages/pyds-1.1.4-py3.8.egg (1.1.4)  
Requirement already satisfied: PyGObject in /usr/lib/python3/dist-packages (from pyds) (3.36.0)  
Requirement already satisfied: pgi in /usr/local/lib/python3.8/dist-packages/pgi-0.0.11.2-py3.8.egg (from pyds) (0.0.11.2)  
Requirement already satisfied: pycairo\>=1.11.1 in /usr/lib/python3/dist-packages (from PyGObject-\>pyds) (1.16.2)

---

<div class="post-metadata">

**Author:** ![yingliu](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/yingliu/32/136703_2.png) [@yingliu](https://forums.developer.nvidia.com/u/yingliu)\
**Post date:** [September 30, 2022, 7:44am UTC](https://forums.developer.nvidia.com/t/deepstreem-installation-fails/229454/2 "2022-09-30T07:44:57Z")

</div>

Are you running [deepstream\_python\_apps](https://github.com/NVIDIA-AI-IOT/deepstream_python_apps) from git hub? Please be sure python binding is installed on [bindings](https://github.com/NVIDIA-AI-IOT/deepstream_python_apps/tree/master/bindings) pages.

---

<div class="post-metadata">

**Author:** ![magnus.gabell](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@magnus.gabell](https://forums.developer.nvidia.com/u/magnus.gabell)\
**Post date:** [September 30, 2022, 7:48am UTC](https://forums.developer.nvidia.com/t/deepstreem-installation-fails/229454/4 "2022-09-30T07:48:31Z")

</div>

I tried that yes. Following the instruction on deepstream home-page on using python bindings.  
I will start with following the bindings instructions provided,

Thanks for quick response.

Will install correct packages for 20.04

---

<div class="post-metadata">

**Author:** ![magnus.gabell](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@magnus.gabell](https://forums.developer.nvidia.com/u/magnus.gabell)\
**Post date:** [September 30, 2022, 7:56am UTC](https://forums.developer.nvidia.com/t/deepstreem-installation-fails/229454/6 "2022-09-30T07:56:18Z")

</div>

~/projects/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/aiadmin/projects/deepstream\_python\_apps/bindings/…/3rdparty/pybind11/include/pybind11/pytypes.h:12,  
from /home/aiadmin/projects/deepstream\_python\_apps/bindings/…/3rdparty/pybind11/include/pybind11/cast.h:13,  
from /home/aiadmin/projects/deepstream\_python\_apps/bindings/…/3rdparty/pybind11/include/pybind11/attr.h:13,  
from /home/aiadmin/projects/deepstream\_python\_apps/bindings/…/3rdparty/pybind11/include/pybind11/pybind11.h:44,  
from /home/aiadmin/projects/deepstream\_python\_apps/bindings/include/bind/bind\_string\_property\_definitions.h:18,  
from /home/aiadmin/projects/deepstream\_python\_apps/bindings/include/bind/bindanalyticsmeta.hpp:20,  
from /home/aiadmin/projects/deepstream\_python\_apps/bindings/src/pyds.cpp:19:  
/home/aiadmin/projects/deepstream\_python\_apps/bindings/…/3rdparty/pybind11/include/pybind11/detail/common.h:112:10: fatal error: Python.h: No such file or directory  
112 | #include \<Python.h\>  
| ^ ~~~~~~~~~  
compilation terminated.  
make[2]: \*\*\* [CMakeFiles/pyds.dir/build.make:63: CMakeFiles/pyds.dir/src/pyds.cpp.o] Error 1  
make[1]: \*\*\* [CMakeFiles/Makefile2:105: CMakeFiles/pyds.dir/all] Error 2  
make: \*\*\* [Makefile:84: all] Error 2

---

<div class="post-metadata">

**Author:** ![magnus.gabell](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@magnus.gabell](https://forums.developer.nvidia.com/u/magnus.gabell)\
**Post date:** [September 30, 2022, 8:15am UTC](https://forums.developer.nvidia.com/t/deepstreem-installation-fails/229454/7 "2022-09-30T08:15:29Z")

</div>

Changed to correct version of Linux for building and  
then I get

```auto
n file included from /home/aiadmin/projects/deepstream_python_apps/bindings/include/pyds.hpp:34,
                 from /home/aiadmin/projects/deepstream_python_apps/bindings/include/bind/bindanalyticsmeta.hpp:23,
                 from /home/aiadmin/projects/deepstream_python_apps/bindings/src/pyds.cpp:19:
/opt/nvidia/deepstream/deepstream-6.1/sources/includes/nvdsinfer.h:287:28: warning: missing initializer for member ‘NvDsInferDims::d’ [-Wmissing-field-initializers]
  287 | NvDsInferDims dims = {0};
      | ^
/opt/nvidia/deepstream/deepstream-6.1/sources/includes/nvdsinfer.h:287:28: warning: missing initializer for member ‘NvDsInferDims::numElements’ [-Wmissing-field-initializers]

```

---

<div class="post-metadata">

**Author:** ![magnus.gabell](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@magnus.gabell](https://forums.developer.nvidia.com/u/magnus.gabell)\
**Post date:** [September 30, 2022, 8:28am UTC](https://forums.developer.nvidia.com/t/deepstreem-installation-fails/229454/8 "2022-09-30T08:28:06Z")

</div>

I managed to run the sample by copying the pyds.so to the test folder.  
The global path settings does not make it work.

But now I get more errors.

`Using winsys: x11 0:00:01.606777690 16758 0x5ddca70 WARN nvinfer gstnvinfer.cpp:643:gst_nvinfer_logger:<primary-inference> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::initialize() <nvdsinfer_context_impl.cpp:1170> [UID = 1]: Warning, OpenCV has been deprecated. Using NMS for clustering instead of cv::groupRectangles with topK = 20 and NMS Threshold = 0.5 WARNING: Deserialize engine failed because file path: /home/aiadmin/projects/deepstream_python_apps/apps/deepstream-test1-usbcam/../../../../samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine open error 0:00:07.058246312 16758 0x5ddca70 WARN nvinfer gstnvinfer.cpp:643:gst_nvinfer_logger:<primary-inference> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1897> [UID = 1]: deserialize engine from file :/home/aiadmin/projects/deepstream_python_apps/apps/deepstream-test1-usbcam/../../../../samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine failed 0:00:07.225513310 16758 0x5ddca70 WARN nvinfer gstnvinfer.cpp:643:gst_nvinfer_logger:<primary-inference> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2002> [UID = 1]: deserialize backend context from engine from file :/home/aiadmin/projects/deepstream_python_apps/apps/deepstream-test1-usbcam/../../../../samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine failed, try rebuild 0:00:07.225569407 16758 0x5ddca70 INFO nvinfer gstnvinfer.cpp:646:gst_nvinfer_logger:<primary-inference> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1923> [UID = 1]: Trying to create engine from model files WARNING: [TRT]: The implicit batch dimension mode has been deprecated. Please create the network with NetworkDefinitionCreationFlag::kEXPLICIT_BATCH flag whenever possible. ERROR: Cannot access prototxt file '/home/aiadmin/projects/deepstream_python_apps/apps/deepstream-test1-usbcam/../../../../samples/models/Primary_Detector/resnet10.prototxt' ERROR: failed to build network since parsing model errors. ERROR: failed to build network. 0:00:10.205343176 16758 0x5ddca70 ERROR nvinfer gstnvinfer.cpp:640:gst_nvinfer_logger:<primary-inference> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1943> [UID = 1]: build engine file failed 0:00:10.375738099 16758 0x5ddca70 ERROR nvinfer gstnvinfer.cpp:640:gst_nvinfer_logger:<primary-inference> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2029> [UID = 1]: build backend context failed 0:00:10.376280182 16758 0x5ddca70 ERROR nvinfer gstnvinfer.cpp:640:gst_nvinfer_logger:<primary-inference> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::initialize() <nvdsinfer_context_impl.cpp:1266> [UID = 1]: generate backend failed, check config file settings 0:00:10.376327383 16758 0x5ddca70 WARN nvinfer gstnvinfer.cpp:846:gst_nvinfer_start:<primary-inference> error: Failed to create NvDsInferContext instance 0:00:10.376342199 16758 0x5ddca70 WARN nvinfer gstnvinfer.cpp:846:gst_nvinfer_start:<primary-inference> error: Config file path: dstest1_pgie_config.txt, NvDsInfer Error: NVDSINFER_CONFIG_FAILED Error: gst-resource-error-quark: Failed to create NvDsInferContext instance (1): /dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvinfer/gstnvinfer.cpp(846): gst_nvinfer_start (): /GstPipeline:pipeline0/GstNvInfer:primary-inference: Config file path: dstest1_pgie_config.txt, NvDsInfer Error: NVDSINFER_CONFIG_FAILED `

---

<div class="post-metadata">

**Author:** ![yingliu](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/yingliu/32/136703_2.png) [@yingliu](https://forums.developer.nvidia.com/u/yingliu)\
**Post date:** [September 30, 2022, 8:42am UTC](https://forums.developer.nvidia.com/t/deepstreem-installation-fails/229454/9 "2022-09-30T08:42:33Z")

</div>

No need to copy pyds.so, please install the wheel: `pip3 install ./pyds-1.1.4-py3-none*.whl`

---

<div class="post-metadata">

**Author:** ![magnus.gabell](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@magnus.gabell](https://forums.developer.nvidia.com/u/magnus.gabell)\
**Post date:** [September 30, 2022, 8:43am UTC](https://forums.developer.nvidia.com/t/deepstreem-installation-fails/229454/10 "2022-09-30T08:43:52Z")

</div>

I did and it  
Tried: pip install pyds  
equirement already satisfied: pyds in /usr/local/lib/python3.8/dist-packages/pyds-1.1.4-py3.8.egg (1.1.4)  
Requirement already satisfied: PyGObject in /usr/lib/python3/dist-packages (from pyds) (3.36.0)  
Requirement already satisfied: pgi in /usr/local/lib/python3.8/dist-packages/pgi-0.0.11.2-py3.8.egg (from pyds) (0.0.11.2)  
Requirement already satisfied: pycairo\>=1.11.1 in /usr/lib/python3/dist-packages (from PyGObject-\>pyds) (1.16.2)

I still need to copy pyds.so

---

<div class="post-metadata">

**Author:** ![magnus.gabell](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@magnus.gabell](https://forums.developer.nvidia.com/u/magnus.gabell)\
**Post date:** [September 30, 2022, 8:45am UTC](https://forums.developer.nvidia.com/t/deepstreem-installation-fails/229454/11 "2022-09-30T08:45:23Z")

</div>

I also found that I do not have the sample models used by the deepstream\_python\_apps.  
The conf file refers to …/…/…/…/samples/models/Primary\_Detector/  
That folder does not exist. There are no Samples 4 folders down from the Apps example folder.

---

<div class="post-metadata">

**Author:** ![Amycao](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/amycao/32/11342_2.png) [@Amycao](https://forums.developer.nvidia.com/u/Amycao)\
**Post date:** [September 30, 2022, 8:52am UTC](https://forums.developer.nvidia.com/t/deepstreem-installation-fails/229454/12 "2022-09-30T08:52:51Z")

</div>

It’s under /opt/nvidia/deepstream/deepstream/samples/models/

---

<div class="post-metadata">

**Author:** ![magnus.gabell](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@magnus.gabell](https://forums.developer.nvidia.com/u/magnus.gabell)\
**Post date:** [September 30, 2022, 8:54am UTC](https://forums.developer.nvidia.com/t/deepstreem-installation-fails/229454/13 "2022-09-30T08:54:02Z")

</div>

aahhh. I will update the config file to get that

---

<div class="post-metadata">

**Author:** ![magnus.gabell](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@magnus.gabell](https://forums.developer.nvidia.com/u/magnus.gabell)\
**Post date:** [September 30, 2022, 9:03am UTC](https://forums.developer.nvidia.com/t/deepstreem-installation-fails/229454/14 "2022-09-30T09:03:18Z")

</div>

```auto
python3 deepstream_test_1.py https://d2qguwbxlx1sbt.cloudfront.net/TextInMotion-VideoSample-1080p.mp4
Creating Pipeline 
 
Creating Source 
 
Creating H264Parser 

Creating Decoder 

Creating EGLSink 

Playing file https://d2qguwbxlx1sbt.cloudfront.net/TextInMotion-VideoSample-1080p.mp4 
Adding elements to Pipeline 

Linking elements in the Pipeline 

Starting pipeline 

Using winsys: x11 
Opening in BLOCKING MODE 
0:00:00.204538220 19464 0x291dfaf0 WARN nvinfer gstnvinfer.cpp:643:gst_nvinfer_logger:<primary-inference> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::initialize() <nvdsinfer_context_impl.cpp:1170> [UID = 1]: Warning, OpenCV has been deprecated. Using NMS for clustering instead of cv::groupRectangles with topK = 20 and NMS Threshold = 0.5
WARNING: Deserialize engine failed because file path: /opt/nvidia/deepstream/deepstream-6.1/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine open error
0:00:02.821862919 19464 0x291dfaf0 WARN nvinfer gstnvinfer.cpp:643:gst_nvinfer_logger:<primary-inference> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1897> [UID = 1]: deserialize engine from file :/opt/nvidia/deepstream/deepstream-6.1/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine failed
0:00:02.979186025 19464 0x291dfaf0 WARN nvinfer gstnvinfer.cpp:643:gst_nvinfer_logger:<primary-inference> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2002> [UID = 1]: deserialize backend context from engine from file :/opt/nvidia/deepstream/deepstream-6.1/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine failed, try rebuild
0:00:02.979925166 19464 0x291dfaf0 INFO nvinfer gstnvinfer.cpp:646:gst_nvinfer_logger:<primary-inference> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1923> [UID = 1]: Trying to create engine from model files
WARNING: [TRT]: The implicit batch dimension mode has been deprecated. Please create the network with NetworkDefinitionCreationFlag::kEXPLICIT_BATCH flag whenever possible.
WARNING: Serialize engine failed because of file path: /opt/nvidia/deepstream/deepstream-6.1/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine opened error
0:00:58.783276720 19464 0x291dfaf0 WARN nvinfer gstnvinfer.cpp:643:gst_nvinfer_logger:<primary-inference> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1950> [UID = 1]: failed to serialize cude engine to file: /opt/nvidia/deepstream/deepstream-6.1/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine
INFO: [Implicit Engine Info]: layers num: 3
0 INPUT kFLOAT input_1 3x368x640       
1 OUTPUT kFLOAT conv2d_bbox 16x23x40        
2 OUTPUT kFLOAT conv2d_cov/Sigmoid 4x23x40         

0:00:58.983980132 19464 0x291dfaf0 INFO nvinfer gstnvinfer_impl.cpp:328:notifyLoadModelStatus:<primary-inference> [UID 1]: Load new model:dstest1_pgie_config.txt sucessfully
Error: gst-resource-error-quark: Resource not found. (3): gstfilesrc.c(532): gst_file_src_start (): /GstPipeline:pipeline0/GstFileSrc:file-source:
No such file "https://d2qguwbxlx1sbt.cloudfront.net/TextInMotion-VideoSample-1080p.mp4"

```

---

<div class="post-metadata">

**Author:** ![magnus.gabell](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@magnus.gabell](https://forums.developer.nvidia.com/u/magnus.gabell)\
**Post date:** [September 30, 2022, 10:04am UTC](https://forums.developer.nvidia.com/t/deepstreem-installation-fails/229454/15 "2022-09-30T10:04:43Z")

</div>

So.

I think the error was the video format. It was not h264.  
I changed to my USB camera and adjusted width/height and I got it to work.

What would be next step and if you have any support-pages I would like to get  
it working on my own Resnet50 model and also a YoloV5 and include FPS count so that I can  
evaluate the AI performance and compare to accuracy.

---

<div class="post-metadata">

**Author:** ![Amycao](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/amycao/32/11342_2.png) [@Amycao](https://forums.developer.nvidia.com/u/Amycao)\
**Post date:** [October 8, 2022, 7:12am UTC](https://forums.developer.nvidia.com/t/deepstreem-installation-fails/229454/16 "2022-10-08T07:12:54Z")

</div>

There no python script for yolov5 post processing, if you need python version.  
You can refer to [GitHub - NVIDIA-AI-IOT/deepstream\_tao\_apps: Sample apps to demonstrate how to deploy models trained with TAO on DeepStream](https://github.com/NVIDIA-AI-IOT/deepstream_tao_apps#tao-models) which support yolov5 model.  
you can try deepstream-app for your resnet50 model.

---

<div class="post-metadata">

**Author:** ![magnus.gabell](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@magnus.gabell](https://forums.developer.nvidia.com/u/magnus.gabell)\
**Post date:** [October 10, 2022, 8:10am UTC](https://forums.developer.nvidia.com/t/deepstreem-installation-fails/229454/17 "2022-10-10T08:10:15Z")

</div>

Hi,  
Thanks for replying. I will try to get the deepstream work with resnet50. Its the model we use anyways.  
so for Orin I will try it. Not working on Jetson as the speed will be too slow.

That means i will have to rule out Deepstream on Jetson.

Is there an example of description on how to modify the resnet10 sample to work with resnet50 for object detection? Some pointers on how to get that to work?

---

<div class="post-metadata">

**Author:** ![Amycao](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/amycao/32/11342_2.png) [@Amycao](https://forums.developer.nvidia.com/u/Amycao)\
**Post date:** [October 14, 2022, 9:15am UTC](https://forums.developer.nvidia.com/t/deepstreem-installation-fails/229454/18 "2022-10-14T09:15:37Z")

</div>

**There is no update from you for a period, assuming this is not an issue anymore.  
Hence we are closing this topic. If need further support, please open a new one.  
Thanks**

You can start from here,  
[https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS\_using\_custom\_model.html](https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_using_custom_model.html)

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [November 15, 2022, 2:06am UTC](https://forums.developer.nvidia.com/t/deepstreem-installation-fails/229454/20 "2022-11-15T02:06:40Z")

</div>

Closed on November 15, 2022, 2:06am UTC

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