Joulescope_ui build failure on Raspberry Pi (64-bit)

I’m running a Raspberry Pi 400 with the latest Raspberry Pi OS (bookworm):
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm

I’m getting the following error when I try to install the joulescope_ui in a Python venv. It looks like it has having issues building the QtAds module.

python -m pip install -U --upgrade-strategy=eager joulescope_ui
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting joulescope_ui
  Using cached joulescope_ui-1.0.31-py3-none-any.whl
Collecting appnope>=0.1.2 (from joulescope_ui)
  Using cached https://www.piwheels.org/simple/appnope/appnope-0.1.3-py2.py3-none-any.whl (4.6 kB)
Collecting fs (from joulescope_ui)
  Using cached https://www.piwheels.org/simple/fs/fs-2.4.16-py2.py3-none-any.whl (138 kB)
Requirement already satisfied: pyjoulescope-driver<2.0.0,>=1.3.18 in /home/glassboard/venv/joulescope/lib/python3.11/site-packages (from joulescope_ui) (1.3.18)
Requirement already satisfied: joulescope<2.0.0,>=1.1.8 in /home/glassboard/venv/joulescope/lib/python3.11/site-packages (from joulescope_ui) (1.1.9)
Collecting markdown (from joulescope_ui)
  Using cached https://www.piwheels.org/simple/markdown/Markdown-3.5-py3-none-any.whl (101 kB)
Requirement already satisfied: psutil in /home/glassboard/venv/joulescope/lib/python3.11/site-packages (from joulescope_ui) (5.9.6)
Requirement already satisfied: pyjls>=0.8.1 in /home/glassboard/venv/joulescope/lib/python3.11/site-packages (from joulescope_ui) (0.8.1)
Collecting pyopengl (from joulescope_ui)
  Using cached https://www.piwheels.org/simple/pyopengl/PyOpenGL-3.1.7-py3-none-any.whl (2.4 MB)
Collecting pyperclip>=1.7.0 (from joulescope_ui)
  Using cached https://www.piwheels.org/simple/pyperclip/pyperclip-1.8.2-py3-none-any.whl (10 kB)
Collecting pyqtgraph>=0.13.2 (from joulescope_ui)
  Using cached https://www.piwheels.org/simple/pyqtgraph/pyqtgraph-0.13.3-py3-none-any.whl (960 kB)
Collecting PySide6<7.0.0,>=6.5.1.1 (from joulescope_ui)
  Using cached PySide6-6.6.0-cp38-abi3-manylinux_2_31_aarch64.whl.metadata (5.1 kB)
Collecting PySide6-QtAds<5.0.0,>=4.1.0 (from joulescope_ui)
  Using cached PySide6-QtAds-4.1.0.1.tar.gz (21.5 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: python-dateutil>=2.7.3 in /home/glassboard/venv/joulescope/lib/python3.11/site-packages (from joulescope_ui) (2.8.2)
Collecting QtPy (from joulescope_ui)
  Using cached https://www.piwheels.org/simple/qtpy/QtPy-2.4.0-py3-none-any.whl (93 kB)
Requirement already satisfied: requests<3.0.0,>=2.0.0 in /home/glassboard/venv/joulescope/lib/python3.11/site-packages (from joulescope_ui) (2.31.0)
Requirement already satisfied: numpy in /home/glassboard/venv/joulescope/lib/python3.11/site-packages (from joulescope<2.0.0,>=1.1.8->joulescope_ui) (1.26.1)
Requirement already satisfied: pymonocypher>=3.1.3.2 in /home/glassboard/venv/joulescope/lib/python3.11/site-packages (from joulescope<2.0.0,>=1.1.8->joulescope_ui) (3.1.3.2)
Collecting shiboken6==6.6.0 (from PySide6<7.0.0,>=6.5.1.1->joulescope_ui)
  Using cached shiboken6-6.6.0-cp38-abi3-manylinux_2_31_aarch64.whl.metadata (2.3 kB)
Collecting PySide6-Essentials==6.6.0 (from PySide6<7.0.0,>=6.5.1.1->joulescope_ui)
  Using cached PySide6_Essentials-6.6.0-cp38-abi3-manylinux_2_31_aarch64.whl.metadata (3.5 kB)
Collecting PySide6-Addons==6.6.0 (from PySide6<7.0.0,>=6.5.1.1->joulescope_ui)
  Using cached PySide6_Addons-6.6.0-cp38-abi3-manylinux_2_31_aarch64.whl.metadata (3.7 kB)
Requirement already satisfied: six>=1.5 in /home/glassboard/venv/joulescope/lib/python3.11/site-packages (from python-dateutil>=2.7.3->joulescope_ui) (1.16.0)
Requirement already satisfied: charset-normalizer<4,>=2 in /home/glassboard/venv/joulescope/lib/python3.11/site-packages (from requests<3.0.0,>=2.0.0->joulescope_ui) (3.3.0)
Requirement already satisfied: idna<4,>=2.5 in /home/glassboard/venv/joulescope/lib/python3.11/site-packages (from requests<3.0.0,>=2.0.0->joulescope_ui) (3.4)
Requirement already satisfied: urllib3<3,>=1.21.1 in /home/glassboard/venv/joulescope/lib/python3.11/site-packages (from requests<3.0.0,>=2.0.0->joulescope_ui) (2.0.7)
Requirement already satisfied: certifi>=2017.4.17 in /home/glassboard/venv/joulescope/lib/python3.11/site-packages (from requests<3.0.0,>=2.0.0->joulescope_ui) (2023.7.22)
Collecting appdirs~=1.4.3 (from fs->joulescope_ui)
  Using cached https://www.piwheels.org/simple/appdirs/appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
Requirement already satisfied: setuptools in /home/glassboard/venv/joulescope/lib/python3.11/site-packages (from fs->joulescope_ui) (68.2.2)
Requirement already satisfied: packaging in /home/glassboard/venv/joulescope/lib/python3.11/site-packages (from QtPy->joulescope_ui) (23.2)
Using cached PySide6-6.6.0-cp38-abi3-manylinux_2_31_aarch64.whl (6.7 kB)
Using cached PySide6_Addons-6.6.0-cp38-abi3-manylinux_2_31_aarch64.whl (110.9 MB)
Using cached PySide6_Essentials-6.6.0-cp38-abi3-manylinux_2_31_aarch64.whl (66.3 MB)
Using cached shiboken6-6.6.0-cp38-abi3-manylinux_2_31_aarch64.whl (160 kB)
Building wheels for collected packages: PySide6-QtAds
  Building wheel for PySide6-QtAds (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for PySide6-QtAds (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [99 lines of output]
      WARNING setuptools_scm._integration.setuptools pyproject.toml does not contain a tool.setuptools_scm section
      running bdist_wheel
      running build
      running build_ext
      -- The C compiler identification is GNU 12.2.0
      -- The CXX compiler identification is GNU 12.2.0
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: /usr/bin/cc - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: /usr/bin/c++ - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Found Python3: /home/glassboard/venv/joulescope/bin/python3.11 (found version "3.11.2") found components: Interpreter
      -- Using python: /home/glassboard/venv/joulescope/bin/python3.11
      CMake Error at CMakeLists.txt:25 (find_package):
        By not providing "FindQt6.cmake" in CMAKE_MODULE_PATH this project has
        asked CMake to find a package configuration file provided by "Qt6", but
        CMake did not find one.

        Could not find a package configuration file provided by "Qt6" with any of
        the following names:

          Qt6Config.cmake
          qt6-config.cmake

        Add the installation prefix of "Qt6" to CMAKE_PREFIX_PATH or set "Qt6_DIR"
        to a directory containing one of the above files.  If "Qt6" provides a
        separate development package or SDK, be sure it has been installed.


      -- Configuring incomplete, errors occurred!

      ==> Configuring:
      $ cmake -S /tmp/pip-install-_dphya7t/pyside6-qtads_126b5cab17f34cd0a34249507cb89037 -B /tmp/pip-install-_dphya7t/pyside6-qtads_126b5cab17f34cd0a34249507cb89037/build/temp.linux-aarch64-cpython-311_PySide6-QtAds -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-install-_dphya7t/pyside6-qtads_126b5cab17f34cd0a34249507cb89037/build/lib.linux-aarch64-cpython-311/PySide6QtAds -DCMAKE_MAKE_PROGRAM=/tmp/pip-build-env-1sdze8pf/overlay/bin/ninja -DBUILD_EXAMPLES:BOOL=OFF -DBUILD_STATIC:BOOL=ON -DADS_VERSION=4.1.0 -DPython3_ROOT_DIR=/home/glassboard/venv/joulescope

      ==> Building:
      $ cmake --build /tmp/pip-install-_dphya7t/pyside6-qtads_126b5cab17f34cd0a34249507cb89037/build/temp.linux-aarch64-cpython-311_PySide6-QtAds --config Release

      ==> Installing:
      $ cmake --install /tmp/pip-install-_dphya7t/pyside6-qtads_126b5cab17f34cd0a34249507cb89037/build/temp.linux-aarch64-cpython-311_PySide6-QtAds

      Traceback (most recent call last):
        File "/home/glassboard/venv/joulescope/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/glassboard/venv/joulescope/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/glassboard/venv/joulescope/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-1sdze8pf/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 434, in build_wheel
          return self._build_with_temp_dir(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-1sdze8pf/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 419, in _build_with_temp_dir
          self.run_setup()
        File "/tmp/pip-build-env-1sdze8pf/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 79, in <module>
        File "/tmp/pip-build-env-1sdze8pf/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-1sdze8pf/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-1sdze8pf/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-1sdze8pf/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-1sdze8pf/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-1sdze8pf/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-1sdze8pf/overlay/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 364, in run
          self.run_command("build")
        File "/tmp/pip-build-env-1sdze8pf/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-1sdze8pf/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-1sdze8pf/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-1sdze8pf/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 131, in run
          self.run_command(cmd_name)
        File "/tmp/pip-build-env-1sdze8pf/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-1sdze8pf/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-1sdze8pf/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-1sdze8pf/overlay/lib/python3.11/site-packages/cmake_build_extension/build_extension.py", line 113, in run
          self.build_extension(ext)
        File "/tmp/pip-build-env-1sdze8pf/overlay/lib/python3.11/site-packages/cmake_build_extension/build_extension.py", line 229, in build_extension
          subprocess.check_call(configure_command)
        File "/usr/lib/python3.11/subprocess.py", line 413, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['cmake', '-S', '/tmp/pip-install-_dphya7t/pyside6-qtads_126b5cab17f34cd0a34249507cb89037', '-B', '/tmp/pip-install-_dphya7t/pyside6-qtads_126b5cab17f34cd0a34249507cb89037/build/temp.linux-aarch64-cpython-311_PySide6-QtAds', '-GNinja', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-install-_dphya7t/pyside6-qtads_126b5cab17f34cd0a34249507cb89037/build/lib.linux-aarch64-cpython-311/PySide6QtAds', '-DCMAKE_MAKE_PROGRAM=/tmp/pip-build-env-1sdze8pf/overlay/bin/ninja', '-DBUILD_EXAMPLES:BOOL=OFF', '-DBUILD_STATIC:BOOL=ON', '-DADS_VERSION=4.1.0', '-DPython3_ROOT_DIR=/home/glassboard/venv/joulescope']' returned non-zero exit status 1.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for PySide6-QtAds
Failed to build PySide6-QtAds
ERROR: Could not build wheels for PySide6-QtAds, which is required to install pyproject.toml-based projects

Hi @drewwestrick and welcome to the Joulescope forum! As far as I know, the Joulescope UI has never run successfully on a Raspberry Pi. The last I checked, Pyside6 did not support Raspberry Pi armx64, but it looks like it might now!

Here is the PySide6-QtAds repo. The README.md has some instructions for building from source. Does that help?

Hi @mliberty hope things are going well for you. I’m looking into that now. So far, the basic build instructions are also failing, but I just started down that rabbit hole. I’ll post my results if I can get it fixed. For now, I am using the python example scripts and the Joulescope command line utility to do what I need. I was just curious if I could get the full UI to run as well.

1 Like

Hi @drewwestrick - I know that a bunch of people have asked about the UI on Raspberry Pi arm64. See issue #100. If you do try more and get it working, please post here! My past advice has been just to buy an inexpensive small-form-factor Intel machine.

Yes, all of python scripting and examples should work on Raspberry Pi arm64 (but not arm32). If you run into any issues, let me know.

@mliberty You are correct that I can get PySide6 to install now on the Pi. I think the final stumbling block is getting PySide6-QtAds to build. Unlike PySide6 which now has an aarch64 wheel it doesn’t appear that PySide6-QtAds has one. I’ve followed their build instructions on the Pi and it gets pretty far into the process. I appears it can pull and build all or most of the dependencies. I went pretty far down the build / dependency rabbit hole, but for Raspberry Pi OS (currently Bookworm) it appears that a lot of the PySide6-QtAds build dependencies want version of packages from older Debian versions (Bullseye for example).

If I get some more time I might pick back up and still play some more dependency wack-a-mole, but even if I get it to build it would still be very suboptimal at least with Raspberry Pi OS. Maybe if I tried an older version of Debian or something like Ubuntu for arm, it might go better.

Hi @drewwestrick - Sorry to hear that it did not go smoothly. I have tried a few times in the past to get the UI on the Raspberry Pi, and I have yet to be successful. Now that Qt can build on the Pi, we have a much better chance.

However, it’s hard to justify the pain. I recent bought a couple of these AMD Ryzen 7 machines with 32 GB RAM for $319 USD. Working great with the Joulescope UI so far!

@mliberty I’ll have to check those out. I just have a few Pi 400’s laying around so that’s what I tend to use if I can. The scripts should work great for the longer term tests I need to run. I’m tired of my Windows laptop messing with my long-term testing by randomly applying updates, etc.

I completely understand the pain of unexpected updates! Also backups, anti-virus scans, and just random scheduled tasks that block the CPU (the Dell support/update app is one offender). The easiest “solution” is to disconnect networking for long term tests. I use wired ethernet for my long-term test machines, and I physically disconnect the cable. The problem is you have to remember this step, which I don’t always…