Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2753

[Reg 6.2 -> 6.5][macOS] pyside6-deploy cannot deploy projects because PySide6_M2M is missing QtDeclarativeOpcUa.framework

    XMLWordPrintable

Details

    • macOS
    • 648e55e29 (tqtc/dev), ec4fc3c62 (tqtc/6.7), 1dad694b1 (tqtc/6.5)

    Description

      Qt 6.5 and newer contains "QtDeclarativeOpcUa.framework", which didn't exist in older versions. Unfortunately, PySide6_M2M is missing this framework, which has 2 distinct consequences:

       

      Problem 1: pyside6-deploy fails to run, even for projects that don't use Qt OPC UA

      Steps to reproduce

      1. Ensure that PySide6_M2M is installed (for example, by using qtpip to install PySide6)
      2. In Qt Creator, run "File" > "New Project..." > "Application (Qt for Python)" > Qt Quick Application - Empty"
      3. Without editing the project, run pyside6-deploy main.py

       

      Outcomes

      FATAL: Error, failed to find path @rpath/QtDeclarativeOpcua.framework/Versions/A/QtDeclarativeOpcua (resolved DLL to /Users/USER/py-venv/py3.11-pyside6.7/lib/python3.11/site-packages/PySide6/Qt/qml/QtOpcUa/QtDeclarativeOpcua.framework/Versions/A/QtDeclarativeOpcua) for /Users/USER/py-venv/py3.11-pyside6.7/lib/python3.11/site-packages/PySide6/Qt/qml/QtOpcUa/libdeclarativeopcuaplugin.dylib from 'PySide6', please report the bug.
      [DEPLOY] Exception occurred: Traceback (most recent call last):
        File "/Users/USER/py-venv/py3.11-pyside6.7/lib/python3.11/site-packages/PySide6/scripts/deploy_lib/commands.py", line 24, in run_command
          subprocess.check_call(command, shell=is_windows)
        File "/opt/homebrew/Cellar/python@3.11/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '[PosixPath('/Users/USER/py-venv/py3.11-pyside6.7/bin/python'), '-m', 'nuitka', '/Users/USER/Test/testproj/main.py', '--follow-imports', '--enable-plugin=pyside6', '--output-dir=/Users/USER/Test/testproj/deployment', '--quiet', '--noinclude-qt-translations', '--standalone', '--macos-create-app-bundle', '--include-data-files=/Users/USER/Test/testproj/main.qml=./main.qml', '--noinclude-dlls=libQt6Charts*', '--noinclude-dlls=libQt6Quick3D*', '--noinclude-dlls=libQt6Sensors*', '--noinclude-dlls=libQt6Test*', '--noinclude-dlls=libQt6WebEngine*', '--macos-app-icon=/Users/USER/py-venv/py3.11-pyside6.7/lib/python3.11/site-packages/PySide6/scripts/deploy_lib/pyside_icon.icns', '--include-qt-plugins=accessiblebridge,networkaccess,networkinformation,platforminputcontexts,platforms/darwin,qml,qmltooling,scenegraph']' returned non-zero exit status 1.
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/Users/USER/py-venv/py3.11-pyside6.7/lib/python3.11/site-packages/PySide6/scripts/deploy.py", line 131, in main
          command_str = nuitka.create_executable(source_file=config.source_file,
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/USER/py-venv/py3.11-pyside6.7/lib/python3.11/site-packages/PySide6/scripts/deploy_lib/nuitka_helper.py", line 103, in create_executable
          command_str, _ = run_command(command=command, dry_run=dry_run)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/USER/py-venv/py3.11-pyside6.7/lib/python3.11/site-packages/PySide6/scripts/deploy_lib/commands.py", line 30, in run_command
          raise RuntimeError(
      RuntimeError: [DEPLOY] Command /Users/USER/py-venv/py3.11-pyside6.7/bin/python -m nuitka /Users/USER/Test/testproj/main.py --follow-imports --enable-plugin=pyside6 --output-dir=/Users/USER/Test/testproj/deployment --quiet --noinclude-qt-translations --standalone --macos-create-app-bundle --include-data-files=/Users/USER/Test/testproj/main.qml=./main.qml --noinclude-dlls=libQt6Charts* --noinclude-dlls=libQt6Quick3D* --noinclude-dlls=libQt6Sensors* --noinclude-dlls=libQt6Test* --noinclude-dlls=libQt6WebEngine* --macos-app-icon=/Users/USER/py-venv/py3.11-pyside6.7/lib/python3.11/site-packages/PySide6/scripts/deploy_lib/pyside_icon.icns --include-qt-plugins=accessiblebridge,networkaccess,networkinformation,platforminputcontexts,platforms/darwin,qml,qmltooling,scenegraph failed with error Command '[PosixPath('/Users/USER/py-venv/py3.11-pyside6.7/bin/python'), '-m', 'nuitka', '/Users/USER/Test/testproj/main.py', '--follow-imports', '--enable-plugin=pyside6', '--output-dir=/Users/USER/Test/testproj/deployment', '--quiet', '--noinclude-qt-translations', '--standalone', '--macos-create-app-bundle', '--include-data-files=/Users/USER/Test/testproj/main.qml=./main.qml', '--noinclude-dlls=libQt6Charts*', '--noinclude-dlls=libQt6Quick3D*', '--noinclude-dlls=libQt6Sensors*', '--noinclude-dlls=libQt6Test*', '--noinclude-dlls=libQt6WebEngine*', '--macos-app-icon=/Users/USER/py-venv/py3.11-pyside6.7/lib/python3.11/site-packages/PySide6/scripts/deploy_lib/pyside_icon.icns', '--include-qt-plugins=accessiblebridge,networkaccess,networkinformation,platforminputcontexts,platforms/darwin,qml,qmltooling,scenegraph']' returned non-zero exit status 1. and return_code1
      
      [DEPLOY] Executed file created in /Users/USER/Test/testproj/main.app
      

       

      Problem 2: Qt OPC UA cannot be used in QML

      ~/Qt/6.7.0/macos/qml/QtOpcUa/libdeclarativeopcuaplugin.dylib is missing a dependency, so it cannot be loaded. At the same time, the user is much more likely to see the error message from QTBUG-125252 first

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              shpremna Shyamnath Premnadh
              skoh-qt Sze Howe Koh
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes