P
PaulH

  • Jan 27, 2022
  • Joined Jan 23, 2022
  • 0 best answers
  • 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.

  • 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.

  • 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.

  • 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.

  • 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?