As the proud new owner of an Oak-D-Lite, the sensor was quickly attached to one of my RaspberryPi 3B+ based GoPiGo3 robots for trying out the DepthAI demo (with separate 5v source).

but Questions:
1) Why is the load on my Raspberry Pi 3B+ rising to 3.5 (3.5 of 4 cores in use)? I bought the Oak-D-Lite with the idea it would do all the image stuff, and my robot's processor could just use the results.

2) Why does my depthai_demo.py pop two qt windows, but the Luxonis demo page shows an "all-in-one" window:

my demo:

The website demo:

3) Why does the startup always include a Floating point exception on the first try:

==== Running guided_manual_test.py->Test Cameras ===
$ python3 guided_manual_test.py 
Starting manual test procedure. Press the [ESC] key to abort.
Using depthai module from:  /home/pi/.local/lib/python3.7/site-packages/depthai.cpython-37m-arm-linux-gnueabihf.so
Depthai version installed:  2.13.3.0
libEGL warning: DRI2: failed to authenticate
qt5ct: using qt5ct plugin
Setting up demo...
Available devices:
[0] 184430101175A41200 [X_LINK_UNBOOTED]
Floating point exception
Error while running demo script... Command '"/usr/bin/python3" depthai_demo.py -dev 184430101175A41200 --noSupervisor --guiType qt' returned non-zero exit status 136.
Waiting 5s for the device to be discoverable again...
Setting up demo...
Available devices:
[0] 184430101175A41200 [X_LINK_UNBOOTED]
USB Connection speed: UsbSpeed.HIGH
Enabling low-bandwidth mode due to low USB speed... (speed: UsbSpeed.HIGH)
Creating MJPEG link for ColorCamera node and color xlink stream...
Stopping demo...
=== TOTAL FPS ===
[color]: 3.4
[disparity]: 3.4
[disparityColor]: 3.4
[nn]: 3.5
...

==== My Install (not virtual env) ====

$ uname -a
Linux PIOSLGCY 5.10.63-v7+ #1496 SMP Wed Dec 1 15:58:11 GMT 2021 armv7l GNU/Linux
$ groups
pi adm dialout cdrom sudo audio video plugdev games users input netdev lpadmin gpio i2c spi
$ ps -ef | grep X
root       550   515  0 09:46 tty7     00:00:24 /usr/lib/xorg/Xorg :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
pi        1743   622  0 10:03 ?        00:00:00 /usr/bin/lxsession -s LXDE-pi -e LXDE
pi        1807  1743  0 10:03 ?        00:00:03 lxpanel --profile LXDE-pi
pi        1808  1743  0 10:03 ?        00:00:01 pcmanfm --desktop --profile LXDE-pi
pi        3863  1999  0 10:35 pts/1    00:00:00 grep --color=auto X


git clone https://github.com/luxonis/depthai.git
cd depthai
sudo curl -fL https://docs.luxonis.com/install_dependencies.sh | bash
python3 install_requirements.py 
  - installs opencv-python 4.4, opencv_contrib_python 4.4, depthai 2.13 
  - installs all to /home/pi/.local/bin
python3 depthai_demo.py

Thanks for the report. I think the heavy load is getting the uncompressed video streams back. So if you just take metadata back the load should go close to zero.

We will also see about doing lower resolution previews on the pi to limit CPU use.

On the exception - we’ll investigate, thanks.

And on the difference in display - this is because Pi doesn’t work well with heavier GUIs/etc. so we disable it on the Pi to save CPU and installation complexity.

And we’ll likely further optimize the Pi version to save CPU.

Thanks,
Brando

    Brandon And on the difference in display - this is because Pi doesn’t work well with heavier GUIs/etc. so we disable it on the Pi to save CPU and installation complexity.

    While a bit more complex, please consider using flask to serve the depthai demo page on the Raspberry Pi, and stream the image to the browser. The GoPiGo3 has a remote camera robot using this technique which only uses 70% of one Pi3B+ core (uptime load average 0.7) to display the picamera image with data markup and accepts mouse input controls.

    The remote camera robot code is here

    Oh good idea! Will discuss with team!

    As a quick update, the load is because we're encoding all the frames on OAK-D-Lite. And so the Pi is having to decode them, which it is struggling with. We didn't realize it was this slow at decoding, at least with OpenCV. And this is what's causing maxed-out CPU use.

    So we're evaluating:

    • A faster way to decode on the Pi
    • Not encoding at all on OAK-D-Lite (so that the Pi doesn't have to decode)

    Thanks,
    Brandon

    Hey all,

    I'll be working on improving the performance of the demo, and from initial profiling shown that most of the time is spend on frames decoding, but there are also other improvements to be made as well (e.g. moving resize calls on device wherever possible)

    To add to Brandon's answer, we're also investigating H264/H265 usage as it has HW acceleration, which can give more improvements than using turbojpeg for decoding speed (which I added today while testing how to speed up the decoding process)

    Regarding web preview, this fits nicely into the efforts we've already made with the demo and we'll focus on adding it after performance optimizations - as not only will it allow to use regular browser to preview the demo, it will also be useful for Docker use-case (where we won't have to map the display to container as it is right now, we'll be able to simply expose a port with the web server).
    In fact, while introducing QT GUI, we added a parameter named --guiType, which now accepts just two values - cv and qt. So, having all of the demo communication already battle-tested with QT, we can add a web GUI type and use current QT GUI implementation and one of the experiments we have as a starting points.

    We could actually mimic what the QT GUI is doing currently, but with HTML elements instead of QML, so both of these experiences would be consistent.

    I didn't think about which technology to use to create this web preview, so if you have any thoughts or suggestions on what we should use, you're more than welcome to share here.
    For streaming process, we have the following ones ready-to-use:

    And personally, I think MJPEG + REST API would be a go here due to stability reasons, with WebRTC being a great modern way to approach this project but at the same time being more unstable and setup-related (e.g. with HTTP access)
    For webserver, I would choose Flask, but again, alternatives welcome.

    20 days later

    Hello, I hope it's no problem when I ocuppy this thread. I didn't want to start a new one because I figured out the same problem as cycob did in point 2.
    I am new to Raspberry PI, I am new to Python and Linux and also to OAK-D and DepthAI. So I am a bit struggling with finding the root cause of this issue.
    What I did so far,
    I installed everything according to the descriptions in the luxonis documents for the Raspberry. I then started the rgb_preview.py and it directly worked. Then I went on to the depthai_demo.py but it directly freezed.
    I tried to find the problem but because of my actual knowledge I didn't find it. I ordered a pre installed OS with the OAK-D-Lite and I tried this MicroSD and it directly worked without a problem. It showed one window as shown in the description and as cycob described in the thread here. So I am sure it is a software problem and no hardware issue. I switched back to my previous MicroSD OS and did an Update and an Upgrade of the OS and after that the depth_demo.py started but showing the above mentioned 2 windows with camera image and depth info but no setup options. I also saw that there is a [X_LINK_UNBOOTED] note which I didn't have on the other MicroSD. But no other errors are shown. It is the depthai 2.14.1.0 installed.
    Maybe you can give me a hint where I should take a look at. Maybe I am missing an update?

      PaulH thanks for reaching out,

      The windowed preview that is visible in point 2 is our OpenCV GUI for the demo script - it used to be the default prior QT GUI and is controlled via command-line arguments, less resource consuming and more stable, but not UX friendly.

      The depthai_demo.py script will try to run QT GUI by default, but if it fails to run QT application, it switches the GUI to OpenCV instead of failing. You can enforce a specific type to be run using -gt / --guiType param and set it either to cv or qt.

      You can try also installing again all dependencies by running the following commands

      # in depthai repository
      $ sudo curl -fL https://docs.luxonis.com/install_dependencies.sh | bash
      $ python3 install_requirements.py

      If the issue still occurs after running these commands, please attach the output log from the commands so that we can analyse what is the root cause

      Hello Lukasz,
      thank you for your quick feedback. I tried to install all the dependencies again. I also updated my python version to 3.9.10. But I got some errors when I wanted to run your commands.

      I hope the format is ok or what is the best way to attach the output log?

      i@raspberrypi:~/depthai $ sudo curl -fL https://docs.luxonis.com/install_dependencies.sh | bash
      % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
      100 5541 100 5541 0 0 2586 0 0:00:02 0:00:02 --:--:-- 1803k
      OK:1 http://archive.raspberrypi.org/debian buster InRelease
      OK:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
      Paketlisten werden gelesen... Fertig
      Paketlisten werden gelesen... Fertig
      Abhängigkeitsbaum wird aufgebaut.
      Statusinformationen werden eingelesen.... Fertig
      build-essential ist schon die neueste Version (12.6).
      git ist schon die neueste Version (1:2.20.1-2+deb10u3).
      libatlas-base-dev ist schon die neueste Version (3.10.3-8+rpi1).
      libdc1394-22-dev ist schon die neueste Version (2.2.5-1).
      libgstreamer1.0-dev ist schon die neueste Version (1.14.4-1).
      libhdf5-dev ist schon die neueste Version (1.10.4+repack-10).
      libilmbase-dev ist schon die neueste Version (2.2.1-2).
      libjasper-dev ist schon die neueste Version (1.900.1-debian1-2.4+deb8u1).
      libjpeg-dev ist schon die neueste Version (1:1.5.2-2+deb10u1).
      libopenexr-dev ist schon die neueste Version (2.2.1-4.1).
      libpng-dev ist schon die neueste Version (1.6.36-6).
      libsm6 ist schon die neueste Version (2:1.2.3-1).
      libtbb-dev ist schon die neueste Version (2018~U6-4).
      libtbb2 ist schon die neueste Version (2018~U6-4).
      libtiff-dev ist schon die neueste Version (4.1.0+git191117-2~deb10u3).
      libxext6 ist schon die neueste Version (2:1.3.3-1+b2).
      pkg-config ist schon die neueste Version (0.29-6).
      python3 ist schon die neueste Version (3.7.3-1).
      python3-dev ist schon die neueste Version (3.7.3-1).
      python3-numpy ist schon die neueste Version (1:1.16.2-1).
      python3-pyqt5 ist schon die neueste Version (5.11.3+dfsg-1+rpi1+b3).
      python3-pyqt5.qtquick ist schon die neueste Version (5.11.3+dfsg-1+rpi1+b3).
      qml-module-qt-labs-platform ist schon die neueste Version (5.11.3+dfsg-2).
      qml-module-qtquick-controls2 ist schon die neueste Version (5.11.3+dfsg-2).
      qml-module-qtquick-layouts ist schon die neueste Version (5.11.3-4).
      qml-module-qtquick-window2 ist schon die neueste Version (5.11.3-4).
      qml-module-qtquick2 ist schon die neueste Version (5.11.3-4).
      qt5-qmake ist schon die neueste Version (5.11.3+dfsg1-1+rpi1+deb10u4).
      qtbase5-dev ist schon die neueste Version (5.11.3+dfsg1-1+rpi1+deb10u4).
      qtbase5-dev-tools ist schon die neueste Version (5.11.3+dfsg1-1+rpi1+deb10u4).
      qtchooser ist schon die neueste Version (66-2).
      qtdeclarative5-dev ist schon die neueste Version (5.11.3-4).
      udev ist schon die neueste Version (241-7~deb10u8+rpi1).
      cmake ist schon die neueste Version (3.16.3-3~bpo10+1).
      ffmpeg ist schon die neueste Version (7:4.1.8-0+deb10u1+rpt1).
      libavcodec-dev ist schon die neueste Version (7:4.1.8-0+deb10u1+rpt1).
      libavformat-dev ist schon die neueste Version (7:4.1.8-0+deb10u1+rpt1).
      libgl1-mesa-glx ist schon die neueste Version (19.3.2-1~bpo10+1~rpt4).
      libgtk2.0-dev ist schon die neueste Version (2.24.32-3+rpt1).
      libswscale-dev ist schon die neueste Version (7:4.1.8-0+deb10u1+rpt1).
      python3-pip ist schon die neueste Version (18.1-5+rpt1).
      0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
      Defaulting to user installation because normal site-packages is not writeable
      ERROR: Exception:
      Traceback (most recent call last):
      File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 173, in _main
      status = self.run(options, args)
      File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 203, in wrapper
      return func(self, options, args)
      File "/usr/local/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 266, in run
      session = self.get_default_session(options)
      File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 74, in get_default_session
      self._session = self.enter_context(self._build_session(options))
      File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 88, in _build_session
      session = PipSession(
      File "/usr/local/lib/python3.9/site-packages/pip/_internal/network/session.py", line 289, in __init__
      self.headers["User-Agent"] = user_agent()
      File "/usr/local/lib/python3.9/site-packages/pip/_internal/network/session.py", line 132, in user_agent
      linux_distribution = distro.linux_distribution() # type: ignore
      File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 125, in linux_distribution
      return _distro.linux_distribution(full_distribution_name)
      File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 681, in linux_distribution
      self.version(),
      File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 741, in version
      self.lsb_release_attr('release'),
      File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 903, in lsb_release_attr
      return self._lsb_release_info.get(attribute, '')
      File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 556, in __get__
      ret = obj.__dict__[self._fname] = self._f(obj)
      File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 1014, in _lsb_release_info
      stdout = subprocess.check_output(cmd, stderr=devnull)
      File "/usr/local/lib/python3.9/subprocess.py", line 424, in check_output
      return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
      File "/usr/local/lib/python3.9/subprocess.py", line 528, in run
      raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1.
      Traceback (most recent call last):
      File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
      return _run_code(code, main_globals, None,
      File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
      exec(code, run_globals)
      File "/usr/local/lib/python3.9/site-packages/pip/__main__.py", line 31, in <module>
      sys.exit(_main())
      File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/main.py", line 70, in main
      return command.main(cmd_args)
      File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 98, in main
      return self._main(args)
      File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 214, in _main
      self.handle_pip_version_check(options)
      File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 143, in handle_pip_version_check
      session = self._build_session(
      File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 88, in _build_session
      session = PipSession(
      File "/usr/local/lib/python3.9/site-packages/pip/_internal/network/session.py", line 289, in __init__
      self.headers["User-Agent"] = user_agent()
      File "/usr/local/lib/python3.9/site-packages/pip/_internal/network/session.py", line 132, in user_agent
      linux_distribution = distro.linux_distribution() # type: ignore
      File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 125, in linux_distribution
      return _distro.linux_distribution(full_distribution_name)
      File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 681, in linux_distribution
      self.version(),
      File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 741, in version
      self.lsb_release_attr('release'),
      File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 903, in lsb_release_attr
      return self._lsb_release_info.get(attribute, '')
      File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 556, in __get__
      ret = obj.__dict__[self._fname] = self._f(obj)
      File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 1014, in _lsb_release_info
      stdout = subprocess.check_output(cmd, stderr=devnull)
      File "/usr/local/lib/python3.9/subprocess.py", line 424, in check_output
      return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
      File "/usr/local/lib/python3.9/subprocess.py", line 528, in run
      raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1.
      pi@raspberrypi:~/depthai $ python3 install_requirements.py
      pip 21.2.4 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)
      ERROR: Exception:
      Traceback (most recent call last):
      File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 173, in _main
      status = self.run(options, args)
      File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 203, in wrapper
      return func(self, options, args)
      File "/usr/local/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 266, in run
      session = self.get_default_session(options)
      File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 74, in get_default_session
      self._session = self.enter_context(self._build_session(options))
      File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 88, in _build_session
      session = PipSession(
      File "/usr/local/lib/python3.9/site-packages/pip/_internal/network/session.py", line 289, in __init__
      self.headers["User-Agent"] = user_agent()
      File "/usr/local/lib/python3.9/site-packages/pip/_internal/network/session.py", line 132, in user_agent
      linux_distribution = distro.linux_distribution() # type: ignore
      File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 125, in linux_distribution
      return _distro.linux_distribution(full_distribution_name)
      File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 681, in linux_distribution
      self.version(),
      File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 741, in version
      self.lsb_release_attr('release'),
      File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 903, in lsb_release_attr
      return self._lsb_release_info.get(attribute, '')
      File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 556, in __get__
      ret = obj.__dict__[self._fname] = self._f(obj)
      File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 1014, in _lsb_release_info
      stdout = subprocess.check_output(cmd, stderr=devnull)
      File "/usr/local/lib/python3.9/subprocess.py", line 424, in check_output
      return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
      File "/usr/local/lib/python3.9/subprocess.py", line 528, in run
      raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1.
      Traceback (most recent call last):
      File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
      return _run_code(code, main_globals, None,
      File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
      exec(code, run_globals)
      File "/usr/local/lib/python3.9/site-packages/pip/__main__.py", line 31, in <module>
      sys.exit(_main())
      File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/main.py", line 70, in main
      return command.main(cmd_args)
      File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 98, in main
      return self._main(args)
      File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 214, in _main
      self.handle_pip_version_check(options)
      File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 143, in handle_pip_version_check
      session = self._build_session(
      File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 88, in _build_session
      session = PipSession(
      File "/usr/local/lib/python3.9/site-packages/pip/_internal/network/session.py", line 289, in __init__
      self.headers["User-Agent"] = user_agent()
      File "/usr/local/lib/python3.9/site-packages/pip/_internal/network/session.py", line 132, in user_agent
      linux_distribution = distro.linux_distribution() # type: ignore
      File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 125, in linux_distribution
      return _distro.linux_distribution(full_distribution_name)
      File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 681, in linux_distribution
      self.version(),
      File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 741, in version
      self.lsb_release_attr('release'),
      File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 903, in lsb_release_attr
      return self._lsb_release_info.get(attribute, '')
      File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 556, in __get__
      ret = obj.__dict__[self._fname] = self._f(obj)
      File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 1014, in _lsb_release_info
      stdout = subprocess.check_output(cmd, stderr=devnull)
      File "/usr/local/lib/python3.9/subprocess.py", line 424, in check_output
      return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
      File "/usr/local/lib/python3.9/subprocess.py", line 528, in run
      raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1.
      Traceback (most recent call last):
      File "/home/pi/depthai/install_requirements.py", line 43, in <module>
      subprocess.check_call(pip_install + ["pip", "-U"])
      File "/usr/local/lib/python3.9/subprocess.py", line 373, in check_call
      raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'pip', 'install', '-U', '--user', 'pip', '-U']' returned non-zero exit status 1.

      Seems like something is wrong with your OS or it's configuration.

      First issue that is handled is

      Defaulting to user installation because normal site-packages is not writeable

      You mentioned new python installation and not being able to write to site-packages means that you won't be able to use Qt - as for Raspberry Pi, the only available Qt5 distribution is python3-pyqt5 that you can download with apt - it's not available neither on PyPi nor on PiWheels. Maybe running these commands as sudo would help? (although I think it's not a safe approach long-term)

      The next issue is a failing command:

      subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1.

      On my Raspberry Pi, this command returns

      $ lsb_release -a
      No LSB modules are available.
      Distributor ID:    Raspbian
      Description:    Raspbian GNU/Linux 11 (bullseye)
      Release:    11
      Codename:    bullseye

      Could you try running this command and try again?

      $ sudo apt-get install lsb-release
      $ lsb_release -a

      Yes I am afraid something went wrong with the Python update.
      When I try
      $ lsb_release -a
      I get a Command not found as responde.
      I also read today that when I install a newer Python version I have to remove my venv first because it always references on the installed version when the venv was created. I am actually at Python 3.9.10. Maybe something is wrong with this. I always get a pip error when I try to install the Python version but when I try to update/upgrade the pi always tells me that it's actual. So I am a bit struggling with the next steps. Maybe new raspbian install.

      If you can, I would suggest using a fresh Raspbian bullseye (11) OS, may be the quickest way to solve this issue

        Luxonis-Lukasz I would suggest using a fresh Raspbian bullseye (11) OS, may be the quickest way to solve this issue

        I would recommend a fresh Legacy Pi OS (10) - it worked very well for me (the OP).

        OK thank you Lukasz and cycob for your help. I try to get more knowledge about lsb and if I can't fix I will do a fresh OS for the RPI.

        So I tried it again today. First I formated the SD-Card and installed the Legacy OS. Then I set everything up and afterwards I tried to install Python3.9.2 as described here.
        https://itheo.tech/install-python-39-on-raspberry-pi
        I wanted to install this version because it's the same one as on the SD-Card I got with the OAK-D-Lite. So I thought it should work.
        I had no errors or anything and after installation and finishing all the described steps I used
        lsb_release -a
        to see if I get an error and no error showed up.
        Then I used the command
        sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1
        changed it to
        sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
        to get python3 also to the version 3.9.2.
        Tried
        lsb_release -a
        again and now the error is back.
        Could this be an issue with Python3.9.2 and Python3.
        Maybe a stupid question but that's the only correlation I see at the moment. And I don't come back to Python3.7 at the moment to see if the error disappears.