Still have error No module named 'common.is_aarch_64' even build and install python bindings successful

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) GPU
• DeepStream Version 6.4
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only) 550
• Issue Type( questions, new requirements, 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)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

According to my issue Github Repository (deepstream-lpr-python-version)

Still have error No module named ‘common.is_aarch_64’ even build and install python bindings successful · Issue #12 · preronamajumder/deepstream-lpr-python-version (github.com)

I build my Docker Image using deepstream 6.4 as base Docker Image.
My Dockerfile include DeepStream python bindings already.

Here is my Dockerfile

FROM nvcr.io/nvidia/deepstream:6.4-gc-triton-devel

RUN DEBIAN_FRONTEND=noninteractive apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python-is-python3 python3-pip python3-dev

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y vlc
RUN sed -i 's/geteuid/getppid/' /usr/bin/vlc

RUN /opt/nvidia/deepstream/deepstream/install.sh

RUN /opt/nvidia/deepstream/deepstream/user_additional_install.sh

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y wget curl vim traceroute \
       net-tools htop iftop iotop gcc g++ build-essential unzip libgirepository1.0-dev \
       apt-transport-https ca-certificates python-gi-dev

RUN pip install --upgrade pip setuptools wheel

RUN pip install opencv-python --verbose
RUN pip install PyGObject pycairo common --verbose

## DeepStream python bindings

WORKDIR /opt/nvidia/deepstream/deepstream/sources
RUN git clone https://github.com/NVIDIA-AI-IOT/deepstream_python_apps.git
WORKDIR /opt/nvidia/deepstream/deepstream/sources/deepstream_python_apps
RUN git submodule update --init

## Installing Gst-python

WORKDIR /opt/nvidia/deepstream/deepstream/sources/deepstream_python_apps/3rdparty/gstreamer/subprojects/gst-python/
RUN meson build && meson configure
WORKDIR /opt/nvidia/deepstream/deepstream/sources/deepstream_python_apps/3rdparty/gstreamer/subprojects/gst-python/build
RUN ninja && ninja install

## Compiling and Installing the bindings

WORKDIR /opt/nvidia/deepstream/deepstream/sources/deepstream_python_apps/bindings
RUN mkdir build
WORKDIR /opt/nvidia/deepstream/deepstream/sources/deepstream_python_apps/bindings/build
RUN cmake ..
RUN make -j$(nproc)
RUN pip install ./pyds-*

Here is my docker-compose.yml

version : '3'

services:
  deepstream-lpr-python:
     build: .
     container_name: deepstream-lpr-python
     shm_size: 8gb
     runtime: nvidia
     restart: always
     privileged: true
     network_mode: host
     environment:
        - TZ=Asia/Bangkok
        - NVIDIA_VISIBLE_DEVICES=all
        - DISPLAY=$DISPLAY
     volumes:
        - /tmp/.X11-unix:/tmp/.X11-unix
        - .:/deepstream-lpr-python
     tty: true
     working_dir: /deepstream-lpr-python

I use command docker-compose build --no-cache

After build success. I use command docker-compose exec deepstream-lpr-python bash

I check if pyds install successful. by using pip list.

root@devteam-pc:/deepstream-lpr-python# pip list | grep pyds
pyds               1.1.10

Then I use command python3 deepstream_lpr_app.py

It’s still show error like this below even I can build and install Python App Bindings successful. Please advise how to solve this problem, Thank you.

root@devteam-pc:/deepstream-lpr-python# python3 deepstream_lpr_app.py
Traceback (most recent call last):
  File "/deepstream-lpr-python/deepstream_lpr_app.py", line 39, in <module>
    from common.is_aarch_64 import is_aarch64
ModuleNotFoundError: No module named 'common.is_aarch_64'

After testing for a long time I can resolve it by add variable PYTHONPATH on Docker Compose,

version : '3'

services:
  deepstream-lpr-python:
     build: .
     container_name: deepstream-lpr-python
     shm_size: 8gb
     runtime: nvidia
     restart: always
     privileged: true
     network_mode: host
     environment:
        - TZ=Asia/Bangkok
        - NVIDIA_VISIBLE_DEVICES=all
        - DISPLAY=$DISPLAY
        - PYTHONPATH=/opt/nvidia/deepstream/deepstream/sources/deepstream_python_apps/apps
     volumes:
        - /tmp/.X11-unix:/tmp/.X11-unix
        - .:/deepstream-lpr-python
     tty: true
     working_dir: /deepstream-lpr-python

This is a python package management issue.

As a supplement, in the official sample, sys.path.append('../') indicates that the common module is in the upper-level directory.

You can add sys.path.append('your path') in your app.py

1 Like

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