Pip installation of pyds fails

Please provide complete information as applicable to your setup.

• Hardware Platform : GPU
• DeepStream Version : 6.1.1
• TensorRT Version : 8.4.1.5
• NVIDIA GPU Driver Version (valid for GPU only) : 525.60.13
• Issue Type : bugs
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)

I am trying to install python bindings of deepstream(Release DeepStream_Python_Apps_Bindings_v1.1.4 · NVIDIA-AI-IOT/deepstream_python_apps · GitHub) as described here(https://github.com/NVIDIA-AI-IOT/deepstream_python_apps/blob/master/HOWTO.md)

pip3 install ~/pyds-1.1.4-py3-none-linux_x86_64.whl

results in the following error -

Processing /home/pyds-1.1.4-py3-none-linux_x86_64.whl
Collecting PyGObject
Using cached PyGObject-3.42.2.tar.gz (719 kB)
Installing build dependencies … done
Getting requirements to build wheel … done
Preparing metadata (pyproject.toml) … done
Collecting pgi
Using cached pgi-0.0.11.2.tar.gz (239 kB)
Preparing metadata (setup.py) … error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [22 lines of output]
Traceback (most recent call last):
File “”, line 2, in
File “”, line 34, in
File “/tmp/pip-install-2bwzhm6g/pgi_4115e20463ac4cac87d9057d7ccaf425/setup.py”, line 18, in
import pgi
File “/tmp/pip-install-2bwzhm6g/pgi_4115e20463ac4cac87d9057d7ccaf425/pgi/init.py”, line 10, in
from .importer import require_version, get_required_version
File “/tmp/pip-install-2bwzhm6g/pgi_4115e20463ac4cac87d9057d7ccaf425/pgi/importer.py”, line 15, in
from .clib.gir import GIRepository
File “/tmp/pip-install-2bwzhm6g/pgi_4115e20463ac4cac87d9057d7ccaf425/pgi/clib/gir/init.py”, line 9, in
from .gibaseinfo import GIInfoType, GIBaseInfo, GIAttributeIter
File “/tmp/pip-install-2bwzhm6g/pgi_4115e20463ac4cac87d9057d7ccaf425/pgi/clib/gir/gibaseinfo.py”, line 12, in
from .gitypelib import GITypelib
File “/tmp/pip-install-2bwzhm6g/pgi_4115e20463ac4cac87d9057d7ccaf425/pgi/clib/gir/gitypelib.py”, line 16, in
_gir = find_library(“girepository-1.0”)
File “/tmp/pip-install-2bwzhm6g/pgi_4115e20463ac4cac87d9057d7ccaf425/pgi/clib/_utils.py”, line 99, in find_library
_internal[name] = cdll.LoadLibrary(_so_mapping[name])
File “/data/opt/miniconda/envs/deepstream/lib/python3.8/ctypes/init.py”, line 451, in LoadLibrary
return self._dlltype(name)
File “/data/opt/miniconda/envs/deepstream/lib/python3.8/ctypes/init.py”, line 373, in init
self._handle = _dlopen(self._name, mode)
OSError: /lib/x86_64-linux-gnu/libgobject-2.0.so.0: undefined symbol: ffi_type_uint32, version LIBFFI_BASE_7.0
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Can someone point out what am I missing here?

What’s the python version on your host? You may build the wheel on your host and install it again: deepstream_python_apps/bindings at master · NVIDIA-AI-IOT/deepstream_python_apps (github.com)

1 Like

I am using conda and the python version is 3.8 which is supposed to be supported. Is there no other way other than building wheel from source?

@yingliu I built the wheel and still get the same error as above

Some symbol cannot be found in libgobject-2.0.so, normally libglib should be installed automatically when installation gstreamer. Can you describe how you installed deepstream on your host?

@yingliu i simply followed steps as mentioned here

https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_Quickstart.html#dgpu-setup-for-ubuntu

@yingliu As you can see here (Dealing with warnings while running deepstream-test3 on dGPU) while there are certain warnings but I am able to run apps.

Do I need to have some environment variable set that I may be missing like LIBFFI_CFLAGS ?
or do i need to change versions of libgobject or libffi ?

What’s the version of your Ubuntu? Please be sure the requirement of DeepStream6.1.1 on dGPU should be satisfied::
Quickstart Guide — DeepStream 6.1.1 Release documentation (nvidia.com)

Can you run the other sample code well? You can try to use the sample stream /opt/nvidia/deepstream/deepstream-6.1/samples/streams

You can also try deepstream docker which is more environment dependent: install nvidia-docker2(container toolkit) Installation Guide — NVIDIA Cloud Native Technologies documentation and pull the deepstream image: DeepStream | NVIDIA NGC

@yingliu
Ubuntu version is 20.04.
All of my dependencies exactly match as given in docs.

As seen here Dealing with warnings while running deepstream-test3 on dGPU - #3 by yingliu I’m able to run the c++ sample apps. Please help me fix the pyds install error as that is needed for development .

Using docker for development will not work for my usecase

I was able to get this to work after setting
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libffi.so.7

3 Likes

Glad to know it works, can this topic also be closedDealing with warnings while running deepstream-test3 on dGPU - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums?

1 Like

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