Failed installation of PyQtChart on Python QML project

Hi sirs.
I am still in the process of evaluating the GUI support for applications on the Torizon platform.
This time I was able to run and debug a Python QML application on the device.
I then wanted to add a sample chart to my GUI.
I added the line “import QtCharts 2.0” to my QML file, but execution fails stating that QtCharts is not installed. That’s fine. As a test, I logged in my container and run “pip3 install PyQtChart”, the procedure starts correctly but in the end it fails while installing the SIP dependency. Any hint? Thanks

My configuration:

  • Colibri iMX6DL 512MB v1.1Y
  • Iris V2.0A
  • TorizonCore Upstream 5.6.0+build.13 (dunfell)
  • Toradex Torizon Support v1.4.0

Here’s the pip3 log:


torizon@be84081b237d:/usr/bin$ pip3 install PyQtChart
Defaulting to user installation because normal site-packages is not writeable
Collecting PyQtChart
  Using cached PyQtChart-5.15.6.tar.gz (68 kB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [144 lines of output]
      Collecting sip<7,>=5.3
        Using cached sip-6.6.2.tar.gz (1.1 MB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'done'
      Collecting PyQt-builder<2,>=1.9
        Using cached PyQt_builder-1.13.0-py3-none-any.whl (3.7 MB)
      Collecting ply
        Using cached ply-3.11-py2.py3-none-any.whl (49 kB)
      Collecting toml
        Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
      Collecting setuptools
        Using cached setuptools-63.1.0-py3-none-any.whl (1.2 MB)
      Collecting packaging
        Using cached packaging-21.3-py3-none-any.whl (40 kB)
      Collecting pyparsing!=3.0.5,>=2.0.2
        Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
      Building wheels for collected packages: sip
        Building wheel for sip (pyproject.toml): started
        Building wheel for sip (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error

        × Building wheel for sip (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [110 lines of output]
            running bdist_wheel
            running build
            running build_py
            creating build
            creating build/lib.linux-armv7l-cpython-39
            creating build/lib.linux-armv7l-cpython-39/sipbuild
            copying sipbuild/version.py -> build/lib.linux-armv7l-cpython-39/sipbuild
            copying sipbuild/setuptools_builder.py -> build/lib.linux-armv7l-cpython-39/sipbuild
            copying sipbuild/pyproject.py -> build/lib.linux-armv7l-cpython-39/sipbuild
            copying sipbuild/py_versions.py -> build/lib.linux-armv7l-cpython-39/sipbuild
            copying sipbuild/project.py -> build/lib.linux-armv7l-cpython-39/sipbuild
            copying sipbuild/installable.py -> build/lib.linux-armv7l-cpython-39/sipbuild
            copying sipbuild/exceptions.py -> build/lib.linux-armv7l-cpython-39/sipbuild
            copying sipbuild/distutils_builder.py -> build/lib.linux-armv7l-cpython-39/sipbuild
            copying sipbuild/configurable.py -> build/lib.linux-armv7l-cpython-39/sipbuild
            copying sipbuild/builder.py -> build/lib.linux-armv7l-cpython-39/sipbuild
            copying sipbuild/buildable.py -> build/lib.linux-armv7l-cpython-39/sipbuild
            copying sipbuild/bindings_configuration.py -> build/lib.linux-armv7l-cpython-39/sipbuild
            copying sipbuild/bindings.py -> build/lib.linux-armv7l-cpython-39/sipbuild
            copying sipbuild/argument_parser.py -> build/lib.linux-armv7l-cpython-39/sipbuild
            copying sipbuild/api.py -> build/lib.linux-armv7l-cpython-39/sipbuild
            copying sipbuild/abstract_project.py -> build/lib.linux-armv7l-cpython-39/sipbuild
            copying sipbuild/abstract_builder.py -> build/lib.linux-armv7l-cpython-39/sipbuild
            copying sipbuild/__init__.py -> build/lib.linux-armv7l-cpython-39/sipbuild
            creating build/lib.linux-armv7l-cpython-39/sipbuild/tools
            copying sipbuild/tools/wheel.py -> build/lib.linux-armv7l-cpython-39/sipbuild/tools
            copying sipbuild/tools/sdist.py -> build/lib.linux-armv7l-cpython-39/sipbuild/tools
            copying sipbuild/tools/install.py -> build/lib.linux-armv7l-cpython-39/sipbuild/tools
            copying sipbuild/tools/build.py -> build/lib.linux-armv7l-cpython-39/sipbuild/tools
            copying sipbuild/tools/__init__.py -> build/lib.linux-armv7l-cpython-39/sipbuild/tools
            creating build/lib.linux-armv7l-cpython-39/sipbuild/module
            copying sipbuild/module/module.py -> build/lib.linux-armv7l-cpython-39/sipbuild/module
            copying sipbuild/module/main.py -> build/lib.linux-armv7l-cpython-39/sipbuild/module
            copying sipbuild/module/abi_version.py -> build/lib.linux-armv7l-cpython-39/sipbuild/module
            copying sipbuild/module/__init__.py -> build/lib.linux-armv7l-cpython-39/sipbuild/module
            creating build/lib.linux-armv7l-cpython-39/sipbuild/generator
            copying sipbuild/generator/utils.py -> build/lib.linux-armv7l-cpython-39/sipbuild/generator
            copying sipbuild/generator/templates.py -> build/lib.linux-armv7l-cpython-39/sipbuild/generator
            copying sipbuild/generator/specification.py -> build/lib.linux-armv7l-cpython-39/sipbuild/generator
            copying sipbuild/generator/python_slots.py -> build/lib.linux-armv7l-cpython-39/sipbuild/generator
            copying sipbuild/generator/__init__.py -> build/lib.linux-armv7l-cpython-39/sipbuild/generator
            creating build/lib.linux-armv7l-cpython-39/sipbuild/distinfo
            copying sipbuild/distinfo/main.py -> build/lib.linux-armv7l-cpython-39/sipbuild/distinfo
            copying sipbuild/distinfo/distinfo.py -> build/lib.linux-armv7l-cpython-39/sipbuild/distinfo
            copying sipbuild/distinfo/__init__.py -> build/lib.linux-armv7l-cpython-39/sipbuild/distinfo
            creating build/lib.linux-armv7l-cpython-39/sipbuild/generator/parser
            copying sipbuild/generator/parser/tokens.py -> build/lib.linux-armv7l-cpython-39/sipbuild/generator/parser
            copying sipbuild/generator/parser/rules.py -> build/lib.linux-armv7l-cpython-39/sipbuild/generator/parser
            copying sipbuild/generator/parser/python_exceptions.py -> build/lib.linux-armv7l-cpython-39/sipbuild/generator/parser
            copying sipbuild/generator/parser/parsetab.py -> build/lib.linux-armv7l-cpython-39/sipbuild/generator/parser
            copying sipbuild/generator/parser/parser_manager.py -> build/lib.linux-armv7l-cpython-39/sipbuild/generator/parser
            copying sipbuild/generator/parser/parser.py -> build/lib.linux-armv7l-cpython-39/sipbuild/generator/parser
            copying sipbuild/generator/parser/instantiations.py -> build/lib.linux-armv7l-cpython-39/sipbuild/generator/parser
            copying sipbuild/generator/parser/annotations.py -> build/lib.linux-armv7l-cpython-39/sipbuild/generator/parser
            copying sipbuild/generator/parser/__init__.py -> build/lib.linux-armv7l-cpython-39/sipbuild/generator/parser
            creating build/lib.linux-armv7l-cpython-39/sipbuild/module/source
            creating build/lib.linux-armv7l-cpython-39/sipbuild/module/source/13
            copying sipbuild/module/source/13/sip_voidptr.c -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/13
            copying sipbuild/module/source/13/sip_threads.c -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/13
            copying sipbuild/module/source/13/sip_object_map.c -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/13
            copying sipbuild/module/source/13/sip_int_convertors.c -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/13
            copying sipbuild/module/source/13/sip_enum.h -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/13
            copying sipbuild/module/source/13/sip_enum.c -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/13
            copying sipbuild/module/source/13/sip_descriptors.c -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/13
            copying sipbuild/module/source/13/sip_core.h -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/13
            copying sipbuild/module/source/13/sip_core.c -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/13
            copying sipbuild/module/source/13/sip_bool.cpp -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/13
            copying sipbuild/module/source/13/sip_array.h -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/13
            copying sipbuild/module/source/13/sip_array.c -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/13
            copying sipbuild/module/source/13/sip.rst.in -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/13
            copying sipbuild/module/source/13/sip.pyi -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/13
            copying sipbuild/module/source/13/sip.h.in -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/13
            copying sipbuild/module/source/13/setup.py.in -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/13
            copying sipbuild/module/source/13/setup.cfg.in -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/13
            copying sipbuild/module/source/13/pyproject.toml -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/13
            copying sipbuild/module/source/13/README.in -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/13
            copying sipbuild/module/source/13/MANIFEST.in -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/13
            copying sipbuild/module/source/13/LICENSE-GPL3 -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/13
            copying sipbuild/module/source/13/LICENSE-GPL2 -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/13
            copying sipbuild/module/source/13/LICENSE -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/13
            creating build/lib.linux-armv7l-cpython-39/sipbuild/module/source/12
            copying sipbuild/module/source/12/voidptr.c -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/12
            copying sipbuild/module/source/12/threads.c -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/12
            copying sipbuild/module/source/12/siplib.c -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/12
            copying sipbuild/module/source/12/sipint.h -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/12
            copying sipbuild/module/source/12/sip_array.h -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/12
            copying sipbuild/module/source/12/sip_array.c -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/12
            copying sipbuild/module/source/12/sip.rst.in -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/12
            copying sipbuild/module/source/12/sip.pyi -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/12
            copying sipbuild/module/source/12/sip.h.in -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/12
            copying sipbuild/module/source/12/setup.py.in -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/12
            copying sipbuild/module/source/12/setup.cfg.in -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/12
            copying sipbuild/module/source/12/qtlib.c -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/12
            copying sipbuild/module/source/12/pyproject.toml -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/12
            copying sipbuild/module/source/12/objmap.c -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/12
            copying sipbuild/module/source/12/int_convertors.c -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/12
            copying sipbuild/module/source/12/descriptors.c -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/12
            copying sipbuild/module/source/12/bool.cpp -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/12
            copying sipbuild/module/source/12/apiversions.c -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/12
            copying sipbuild/module/source/12/README.in -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/12
            copying sipbuild/module/source/12/MANIFEST.in -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/12
            copying sipbuild/module/source/12/LICENSE-GPL3 -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/12
            copying sipbuild/module/source/12/LICENSE-GPL2 -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/12
            copying sipbuild/module/source/12/LICENSE -> build/lib.linux-armv7l-cpython-39/sipbuild/module/source/12
            running build_ext
            building 'sipbuild.code_generator' extension
            creating build/temp.linux-armv7l-cpython-39
            creating build/temp.linux-armv7l-cpython-39/code_generator
            arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -Icode_generator -I/usr/include/python3.9 -c code_generator/export.c -o build/temp.linux-armv7l-cpython-39/code_generator/export.o
            error: command 'arm-linux-gnueabihf-gcc' failed: No such file or directory
            [end of output]

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

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
torizon@be84081b237d:/usr/bin$

This is the complete log when I add “pip3 install PyQtChart” to my setup.sh file and hit F5
log.txt (52.0 KB)

Hi @Lorenzo ,

You can install QtCharts via the Debian Feeds using the extrapackages configuration, as described here: Python Development and Debugging on TorizonCore Using Visual Studio Code | Toradex Developer Center. Just replace the package name with qml-module-qtcharts, press F5 and it should work.

Let me know if this helps you.

Best regards,
Lucas Akira

Thanks, Lucas, it’s working.
Regards,
Lorenzo

Glad that worked for you!

Best regards,
Lucas Akira