Error building python bindings. Need Help

I have DeepStream 6.0.1 installed and want to uninstall and reinstall it.

To remove DeepStream 6.0.1:

  1. Open the uninstall.sh file in /opt/nvidia/deepstream/deepstream/
  2. Do I need to Set PREV_DS_VER as 6.0 (or Set PREV_DS_VER as 6.0.1)?? @junshengy
  3. Run the following script as sudo ./uninstall.sh (Do I need to run this script inside the /opt/nvidia/deepstream/deepstream/ folder ?)

Pls clarify if I need to set PREV_DS_VER as 6.0 or as 6.0.1 and from which directory do I run the uninstall.sh script

After carrying out the 3 steps above, do I also need to manually delete the deepstream folder under /opt/nvidia folder before I reinstall Deepstream SDK again ?? @junshengy

@junshengy Kindly please revert.

Have you installed deepstream sdk successfully ?

In addition to deepstrea-app, you can run deepstream-test1-app for testing first.

Its code is in /opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-test1

Yes, I’ve reinstalled DS, I’m trying to run a sample app now.

Do I have to Install the NVIDIA display driver 470.63.01 to run sample/custom DS applications after installing DS?

$ deepstream-app --version-all
deepstream-app version 6.0.1
DeepStreamSDK 6.0.1
CUDA Driver Version: 10.2
CUDA Runtime Version: 10.2
TensorRT Version: 8.2
cuDNN Version: 8.2
libNVWarp360 Version: 2.0.1d3

Do I need to update/install anything else begin I begin creating custom applications on deepstream sdk?

To install Python bindings, I’ve come across two links that match my configurations, here’s link1 and here’s link2

Is it okay to install the python bindings from either of the 2 links? I feel using link1 is easier as it involves downloading a .whl file, can I go ahead and install the python bindings from this link?

Kindly please help me with the step by step instructions for installing python bindings from link1 for aarch64 architecture.

Aren’t you using jetson nano? jetson nano’s gpu driver is part of jetpack

Download aarch64 from link1 and run the command line pip3 install pyds-1.1.1-py3-none-linux_aarch64.whl .

Then run then deepstream_test_1.py for test

So I don’t have to carry out getting up all the base dependencies from link2 if I’m downloading the .whl file from link1 right?

Apart from this, is there anything else I need to install regarding python bindings from link1 to run sample/custom apps on DS ? The .whl file from link1 takes care of the dependencies also right?

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

The dependencies still need to be installed.

The *.whl just avoid build the pyds by yourself.
Compiling python bindings is very tedious.

After downloading the .whl file and pip3 install, what do I do next ?

Deepstream’s documentation has a detailed description

After pip3 install command, don’t I have to compile the python bindings ?

Kindly pls help me through this.

Does this take care of the dependencies too before I run deepstream_test_1.py for test?

Also, which directory do I need to place the above .whl file (does it need to be in the deeepstream folder) before I run the .py test ??

Failed to install python bindings:

After installing the pyds-1.1.1-py3-none-linux_aarch64.whl file from this link and after running the command:
$pip3 install pyds-1.1.1-py3-none-linux_aarch64.whl (from the same directory)

Here’s what I get:

~/Downloads$ pip3 install pyds-1.1.1-py3-none-linux_aarch64.whl
Processing ./pyds-1.1.1-py3-none-linux_aarch64.whl
Collecting PyGObject (from pyds==1.1.1)
Using cached https://files.pythonhosted.org/packages/fe/40/9afaeb8d3b453fb8596fcb6c7bc2b64e434868c91eda19955742778eff74/PyGObject-3.42.2.tar.gz
Collecting pgi (from pyds==1.1.1)
Collecting pycairo>=1.16.0 (from PyGObject->pyds==1.1.1)
Building wheels for collected packages: PyGObject
Running setup.py bdist_wheel for PyGObject … error
Complete output from command /usr/bin/python3 -u -c “import setuptools, tokenize;file=‘/tmp/pip-build-zeqf_as5/PyGObject/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” bdist_wheel -d /tmp/tmppx7fuu7lpip-wheel- --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-aarch64-3.6
creating build/lib.linux-aarch64-3.6/pygtkcompat
copying pygtkcompat/generictreemodel.py → build/lib.linux-aarch64-3.6/pygtkcompat
copying pygtkcompat/init.py → build/lib.linux-aarch64-3.6/pygtkcompat
copying pygtkcompat/pygtkcompat.py → build/lib.linux-aarch64-3.6/pygtkcompat
creating build/lib.linux-aarch64-3.6/gi
copying gi/_propertyhelper.py → build/lib.linux-aarch64-3.6/gi
copying gi/init.py → build/lib.linux-aarch64-3.6/gi
copying gi/_gtktemplate.py → build/lib.linux-aarch64-3.6/gi
copying gi/_option.py → build/lib.linux-aarch64-3.6/gi
copying gi/types.py → build/lib.linux-aarch64-3.6/gi
copying gi/_signalhelper.py → build/lib.linux-aarch64-3.6/gi
copying gi/_error.py → build/lib.linux-aarch64-3.6/gi
copying gi/pygtkcompat.py → build/lib.linux-aarch64-3.6/gi
copying gi/_constants.py → build/lib.linux-aarch64-3.6/gi
copying gi/importer.py → build/lib.linux-aarch64-3.6/gi
copying gi/module.py → build/lib.linux-aarch64-3.6/gi
copying gi/_ossighelper.py → build/lib.linux-aarch64-3.6/gi
copying gi/docstring.py → build/lib.linux-aarch64-3.6/gi
creating build/lib.linux-aarch64-3.6/gi/repository
copying gi/repository/init.py → build/lib.linux-aarch64-3.6/gi/repository
creating build/lib.linux-aarch64-3.6/gi/overrides
copying gi/overrides/Gdk.py → build/lib.linux-aarch64-3.6/gi/overrides
copying gi/overrides/init.py → build/lib.linux-aarch64-3.6/gi/overrides
copying gi/overrides/Gtk.py → build/lib.linux-aarch64-3.6/gi/overrides
copying gi/overrides/Gio.py → build/lib.linux-aarch64-3.6/gi/overrides
copying gi/overrides/keysyms.py → build/lib.linux-aarch64-3.6/gi/overrides
copying gi/overrides/GIMarshallingTests.py → build/lib.linux-aarch64-3.6/gi/overrides
copying gi/overrides/GLib.py → build/lib.linux-aarch64-3.6/gi/overrides
copying gi/overrides/GdkPixbuf.py → build/lib.linux-aarch64-3.6/gi/overrides
copying gi/overrides/Pango.py → build/lib.linux-aarch64-3.6/gi/overrides
copying gi/overrides/GObject.py → build/lib.linux-aarch64-3.6/gi/overrides
running build_ext
pycairo: trying include directory: ‘/usr/lib/python3/dist-packages/cairo/include’
pycairo: header file (‘/usr/lib/python3/dist-packages/cairo/include/py3cairo.h’) not found
pycairo: pkg-config
Package py3cairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `py3cairo.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘py3cairo’ found
Command ‘(‘pkg-config’, ‘–print-errors’, ‘–exists’, ‘py3cairo >= 1.16.0’)’ returned non-zero exit status 1.


Failed building wheel for PyGObject
Running setup.py clean for PyGObject
Failed to build PyGObject
Installing collected packages: pycairo, PyGObject, pgi, pyds
Exception:
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/pip/basecommand.py”, line 215, in main
status = self.run(options, args)
File “/usr/lib/python3/dist-packages/pip/commands/install.py”, line 360, in run
prefix=options.prefix_path,
File “/usr/lib/python3/dist-packages/pip/req/req_set.py”, line 784, in install
**kwargs
File “/usr/lib/python3/dist-packages/pip/req/req_install.py”, line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File “/usr/lib/python3/dist-packages/pip/req/req_install.py”, line 1064, in move_wheel_files
isolated=self.isolated,
File “/usr/lib/python3/dist-packages/pip/wheel.py”, line 247, in move_wheel_files
prefix=prefix,
File “/usr/lib/python3/dist-packages/pip/locations.py”, line 153, in distutils_scheme
i.finalize_options()
File “/usr/share/python-wheels/setuptools-39.0.1-py2.py3-none-any.whl/setuptools/command/install.py”, line 38, in finalize_options
orig.install.finalize_options(self)
File “/usr/lib/python3.6/distutils/command/install.py”, line 351, in finalize_options
self.create_home_path()
File “/usr/lib/python3.6/distutils/command/install.py”, line 581, in create_home_path
os.makedirs(path, 0o700)
File “/usr/lib/python3.6/os.py”, line 210, in makedirs
makedirs(head, mode, exist_ok)
File “/usr/lib/python3.6/os.py”, line 220, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: ‘/home/nikhil/.local/lib/python3.6’

Please help me resolve this error. @junshengy

@junshengy How do I resolve this ?

I see you got the answer on another topic, close this thread.

If need further support, please open a new one. Thanks

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