Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Debugging MWE of pyside6-deploy with WebEngine
Qt 6.11 is out! See what's new in the release blog

Debugging MWE of pyside6-deploy with WebEngine

Scheduled Pinned Locked Moved Solved Installation and Deployment
pyside6-deploywebengine
4 Posts 2 Posters 405 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mitchal Dichter
    wrote on last edited by
    #1

    I'm trying to use pyside6-deploy with a Hello World! MWE using WebEngine. I'm using Qt's very own pyside6-deploy as opposed to other tools since getting WebEngine to work is a bother and if anyone can figure out how to use Qt's pyside6-deploy on a simple Qt PySide6 app using Qt's WebEngine, it's the Qt Company.

    I'm using Python 3.13.12 and PySide6.8.3 on Windows 11, which should be fine based on this Qt provided Python compatibility matrix.

    I have no idea what I'm supposed to do to get this working. I thought it would work out of the box, but WebEngine seems to complicate matters based on other people on the internet trying to get this to work. What should I do?

    Below is the contents of main.py located in "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\main.py"

    import sys
    
    from PySide6.QtWidgets import QApplication, QMainWindow
    from PySide6.QtWebEngineWidgets import QWebEngineView
    
    class MainWindow(QMainWindow):
        def __init__(self):
            super().__init__()
            
            self.web_engine_view = QWebEngineView()
            self.web_engine_view.setHtml("<!DOCTYPE html><html><body><h1>Hello from Pyside6 WebEngineView!</h1></body></html>")
            
            self.setCentralWidget(self.web_engine_view)
    
    if __name__ == "__main__":
        app = QApplication(sys.argv)
        main_window = MainWindow()
        main_window.showMaximized()
        main_window.show()
        app.exec()
    

    I opened a Windows 11 cmd.exe window in the testing_deploy directory, created a virtual environment with python3.13.12, then simply typed pyside6-deploy and enter since it will use the main.py file automatically.

    Microsoft Windows [Version 10.0.26200.7840]
    (c) Microsoft Corporation. All rights reserved.
    
    C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy>python --version
    Python 3.13.12
    
    C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy>python -m venv env
    
    C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy>env\Scripts\activate.bat
    
    (env) C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy>pip install pyside6==6.8.*
    Collecting pyside6==6.8.*
      Downloading PySide6-6.8.3-cp39-abi3-win_amd64.whl.metadata (5.7 kB)
    Collecting shiboken6==6.8.3 (from pyside6==6.8.*)
      Downloading shiboken6-6.8.3-cp39-abi3-win_amd64.whl.metadata (2.8 kB)
    Collecting PySide6-Essentials==6.8.3 (from pyside6==6.8.*)
      Downloading PySide6_Essentials-6.8.3-cp39-abi3-win_amd64.whl.metadata (4.1 kB)
    Collecting PySide6-Addons==6.8.3 (from pyside6==6.8.*)
      Downloading PySide6_Addons-6.8.3-cp39-abi3-win_amd64.whl.metadata (4.4 kB)
    Downloading PySide6-6.8.3-cp39-abi3-win_amd64.whl (561 kB)
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 561.1/561.1 kB 5.5 MB/s  0:00:00
    Downloading PySide6_Addons-6.8.3-cp39-abi3-win_amd64.whl (127.9 MB)
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 127.9/127.9 MB 7.2 MB/s  0:00:17
    Downloading PySide6_Essentials-6.8.3-cp39-abi3-win_amd64.whl (72.2 MB)
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 72.2/72.2 MB 7.1 MB/s  0:00:10
    Downloading shiboken6-6.8.3-cp39-abi3-win_amd64.whl (1.2 MB)
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 5.9 MB/s  0:00:00
    Installing collected packages: shiboken6, PySide6-Essentials, PySide6-Addons, pyside6
    Successfully installed PySide6-Addons-6.8.3 PySide6-Essentials-6.8.3 pyside6-6.8.3 shiboken6-6.8.3
    
    [notice] A new release of pip is available: 25.3 -> 26.0.1
    [notice] To update, run: python.exe -m pip install --upgrade pip
    
    (env) C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy>python main.py
    
    (env) C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy>pyside6-deploy
    C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\PySide6\scripts\deploy_lib\config.py:495: RuntimeWarning: [DEPLOY] Unable to find dumpbin. This tool helps to find the Qt module dependencies of the application. Skipping checking for dependencies.
      warnings.warn(f"[DEPLOY] Unable to find {self.dependency_reader.lib_reader_name}. This "
    Collecting Nuitka==2.5.1
      Using cached Nuitka-2.5.1-cp313-cp313-win_amd64.whl
    Collecting ordered-set>=4.1.0 (from Nuitka==2.5.1)
      Using cached ordered_set-4.1.0-py3-none-any.whl.metadata (5.3 kB)
    Collecting zstandard>=0.15 (from Nuitka==2.5.1)
      Downloading zstandard-0.25.0-cp313-cp313-win_amd64.whl.metadata (3.3 kB)
    Using cached ordered_set-4.1.0-py3-none-any.whl (7.6 kB)
    Downloading zstandard-0.25.0-cp313-cp313-win_amd64.whl (506 kB)
    Installing collected packages: zstandard, ordered-set, Nuitka
    Successfully installed Nuitka-2.5.1 ordered-set-4.1.0 zstandard-0.25.0
    
    [notice] A new release of pip is available: 25.3 -> 26.0.1
    [notice] To update, run: python.exe -m pip install --upgrade pip
    Traceback (most recent call last):
      File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\nuitka\__main__.py", line 206, in <module>
        main()
        ~~~~^^
      File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\nuitka\__main__.py", line 188, in main
        MainControl.main()
        ~~~~~~~~~~~~~~~~^^
      File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\nuitka\MainControl.py", line 1160, in main
        _main()
        ~~~~~^^
      File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\nuitka\MainControl.py", line 999, in _main
        main_module = _createMainModule()
      File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\nuitka\MainControl.py", line 146, in _createMainModule
        main_module = buildMainModuleTree(
            source_code=None,
        )
      File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\nuitka\tree\Building.py", line 1186, in buildMainModuleTree
        module.setStandardLibraryModules(
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
            early_module_names=detectEarlyImports(),
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            stdlib_modules_names=detectStdlibAutoInclusionModules(),
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        )
        ^
      File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\nuitka\nodes\ModuleNodes.py", line 961, in setStandardLibraryModules
        assert finding != "not-found", early_module_name
               ^^^^^^^^^^^^^^^^^^^^^^
    AssertionError: collections.abc
    [DEPLOY] Exception occurred: Traceback (most recent call last):
      File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\PySide6\scripts\deploy_lib\commands.py", line 27, in run_command
        subprocess.check_call(command, shell=is_windows)
        ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\mldic\AppData\Local\Programs\Python\Python313\Lib\subprocess.py", line 419, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '[WindowsPath('C:/Users/mldic/Documents/GitHub/BEMinstructionals.github.io/dev/testing_deploy/env/Scripts/python.exe'), '-m', 'nuitka', 'C:\\Users\\mldic\\Documents\\GitHub\\BEMinstructionals.github.io\\dev\\testing_deploy\\main.py', '--follow-imports', '--enable-plugin=pyside6', '--output-dir=C:\\Users\\mldic\\Documents\\GitHub\\BEMinstructionals.github.io\\dev\\testing_deploy\\deployment', '--quiet', '--noinclude-qt-translations', '--onefile', '--noinclude-dlls=*.cpp.o', '--noinclude-dlls=*.qsb', '--windows-icon-from-ico=C:\\Users\\mldic\\Documents\\GitHub\\BEMinstructionals.github.io\\dev\\testing_deploy\\env\\Lib\\site-packages\\PySide6\\scripts\\deploy_lib\\pyside_icon.ico']' returned non-zero exit status 1.
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\PySide6\scripts\deploy.py", line 152, in main
        command_str = nuitka.create_executable(source_file=config.source_file,
                                               extra_args=config.extra_args,
        ...<5 lines>...
                                               permissions=config.permissions,
                                               mode=config.mode)
      File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\PySide6\scripts\deploy_lib\nuitka_helper.py", line 178, in create_executable
        command_str, _ = run_command(command=command, dry_run=dry_run)
                         ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\PySide6\scripts\deploy_lib\commands.py", line 33, in run_command
        raise RuntimeError(
        ...<2 lines>...
        )
    RuntimeError: [DEPLOY] Command C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Scripts\python.exe -m nuitka C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\main.py --follow-imports --enable-plugin=pyside6 --output-dir=C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\deployment --quiet --noinclude-qt-translations --onefile --noinclude-dlls=*.cpp.o --noinclude-dlls=*.qsb --windows-icon-from-ico=C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\PySide6\scripts\deploy_lib\pyside_icon.ico failed with error Command '[WindowsPath('C:/Users/mldic/Documents/GitHub/BEMinstructionals.github.io/dev/testing_deploy/env/Scripts/python.exe'), '-m', 'nuitka', 'C:\\Users\\mldic\\Documents\\GitHub\\BEMinstructionals.github.io\\dev\\testing_deploy\\main.py', '--follow-imports', '--enable-plugin=pyside6', '--output-dir=C:\\Users\\mldic\\Documents\\GitHub\\BEMinstructionals.github.io\\dev\\testing_deploy\\deployment', '--quiet', '--noinclude-qt-translations', '--onefile', '--noinclude-dlls=*.cpp.o', '--noinclude-dlls=*.qsb', '--windows-icon-from-ico=C:\\Users\\mldic\\Documents\\GitHub\\BEMinstructionals.github.io\\dev\\testing_deploy\\env\\Lib\\site-packages\\PySide6\\scripts\\deploy_lib\\pyside_icon.ico']' returned non-zero exit status 1. and return_code1
    
    ERROR:root:[DEPLOY] Executable not found at C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\deployment\main.exe
    
    (env) C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy>deactivate
    C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy>
    

    A pysidedeploy.spec file was created with the below contents.

    [app]
    
    # title of your application
    title = pyside_app_demo
    
    # project directory. the general assumption is that project_dir is the parent directory
    # of input_file
    project_dir = C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy
    
    # source file path
    input_file = C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\main.py
    
    # directory where the executable output is generated
    exec_directory = .
    
    # path to .pyproject project file
    project_file = 
    
    # application icon
    icon = C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\PySide6\scripts\deploy_lib\pyside_icon.ico
    
    [python]
    
    # python path
    python_path = C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Scripts\python.exe
    
    # python packages to install
    packages = Nuitka==2.5.1
    
    # buildozer = for deploying Android application
    android_packages = buildozer==1.5.0,cython==0.29.33
    
    [qt]
    
    # comma separated path to qml files required
    # normally all the qml files required by the project are added automatically
    qml_files = 
    
    # excluded qml plugin binaries
    excluded_qml_plugins = 
    
    # qt modules used. comma separated
    modules = WebEngineWidgets,Widgets
    
    # qt plugins used by the application. only relevant for desktop deployment. for qt plugins used
    # in android application see [android][plugins]
    plugins = styles
    
    [android]
    
    # path to pyside wheel
    wheel_pyside = 
    
    # path to shiboken wheel
    wheel_shiboken = 
    
    # plugins to be copied to libs folder of the packaged application. comma separated
    plugins = 
    
    [nuitka]
    
    # usage description for permissions requested by the app as found in the info.plist file
    # of the app bundle
    # eg = extra_args = --show-modules --follow-stdlib
    macos.permissions = 
    
    # mode of using nuitka. accepts standalone or onefile. default is onefile.
    mode = onefile
    
    # (str) specify any extra nuitka arguments
    extra_args = --quiet --noinclude-qt-translations
    
    [buildozer]
    
    # build mode
    # possible options = [release, debug]
    # release creates an aab, while debug creates an apk
    mode = debug
    
    # contrains path to pyside6 and shiboken6 recipe dir
    recipe_dir = 
    
    # path to extra qt android jars to be loaded by the application
    jars_dir = 
    
    # if empty uses default ndk path downloaded by buildozer
    ndk_path = 
    
    # if empty uses default sdk path downloaded by buildozer
    sdk_path = 
    
    # other libraries to be loaded. comma separated.
    # loaded at app startup
    local_libs = 
    
    # architecture of deployed platform
    # possible values = ["aarch64", "armv7a", "i686", "x86_64"]
    arch = 
    

    There was also a nuitka-crash-report.xml file created with the below contents.

    <?xml version='1.0' encoding='utf8'?>
    <nuitka-compilation-report nuitka_version="2.5.1" nuitka_commercial_version="not installed" completion="exception">
      <exception exception_type="AssertionError" exception_value="collections.abc">
    Traceback (most recent call last):
      File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\nuitka\MainControl.py", line 1160, in main
        _main()
        ~~~~~^^
      File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\nuitka\MainControl.py", line 999, in _main
        main_module = _createMainModule()
      File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\nuitka\MainControl.py", line 146, in _createMainModule
        main_module = buildMainModuleTree(
            source_code=None,
        )
      File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\nuitka\tree\Building.py", line 1186, in buildMainModuleTree
        module.setStandardLibraryModules(
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
            early_module_names=detectEarlyImports(),
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            stdlib_modules_names=detectStdlibAutoInclusionModules(),
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        )
        ^
      File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\nuitka\nodes\ModuleNodes.py", line 961, in setStandardLibraryModules
        assert finding != "not-found", early_module_name
               ^^^^^^^^^^^^^^^^^^^^^^
    AssertionError: collections.abc
    </exception>
      <performance>
        <memory_usage name="after_launch" value="40271872" />
      </performance>
      <data_composer blob_size="None" />
      <command_line>
        <option value="C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\main.py" />
        <option value="--follow-imports" />
        <option value="--enable-plugin=pyside6" />
        <option value="--output-dir=C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\deployment" />
        <option value="--quiet" />
        <option value="--noinclude-qt-translations" />
        <option value="--onefile" />
        <option value="--noinclude-dlls=*.cpp.o" />
        <option value="--noinclude-dlls=*.qsb" />
        <option value="--windows-icon-from-ico=C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\PySide6\scripts\deploy_lib\pyside_icon.ico" />
      </command_line>
      <plugins>
        <plugin name="anti-bloat" user_enabled="no" />
        <plugin name="data-files" user_enabled="no" />
        <plugin name="delvewheel" user_enabled="no" />
        <plugin name="dll-files" user_enabled="no" />
        <plugin name="eventlet" user_enabled="no" />
        <plugin name="gevent" user_enabled="no" />
        <plugin name="gi" user_enabled="no" />
        <plugin name="glfw" user_enabled="no" />
        <plugin name="implicit-imports" user_enabled="no" />
        <plugin name="kivy" user_enabled="no" />
        <plugin name="matplotlib" user_enabled="no" />
        <plugin name="multiprocessing" user_enabled="no" />
        <plugin name="options-nanny" user_enabled="no" />
        <plugin name="pbr-compat" user_enabled="no" />
        <plugin name="pkg-resources" user_enabled="no" />
        <plugin name="playwright" user_enabled="no" />
        <plugin name="pyside6" user_enabled="yes" />
        <plugin name="pywebview" user_enabled="no" />
        <plugin name="spacy" user_enabled="no" />
        <plugin name="transformers" user_enabled="no" />
      </plugins>
      <distributions />
      <python python_exe="${sys.prefix}\Scripts\python.exe" python_flavor="CPython Official" python_version="3.13.12" os_name="Windows" os_release="11" arch_name="x86_64" filesystem_encoding="utf-8">
        <search_path>
          <path value="${cwd}" />
          <path value="${sys.real_prefix}\DLLs" />
          <path value="${sys.real_prefix}\Lib" />
          <path value="${sys.real_prefix}" />
          <path value="${sys.prefix}" />
          <path value="${sys.prefix}\Lib\site-packages" />
        </search_path>
      </python>
      <output run_filename="${cwd}\deployment\main.exe" />
    </nuitka-compilation-report>
    

    To reiterate, I have no idea what I'm supposed to do to get this working. I thought it would work out of the box, but WebEngine seems to complicate matters based on other people on the internet trying to get this to work. What should I do?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Mitchal Dichter
      wrote on last edited by
      #4

      So not exactly a solution, but pyinstaller on windows is working at this time, although it often breaks with new releases of pyside and different operating systems.

      Including all the stuff for WebEngine is a chronic problem for things like nuitka and pyinstaller because pyside can change the location of WebEngine stuff and different operating systems need stuff in different places. Code signing is also a chronic problem.

      1 Reply Last reply
      1
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi,

        I haven't yet used that tool, especially on Windows but did you see the warning about dumpbin not being found ?
        That might help you get better result.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • M Offline
          M Offline
          Mitchal Dichter
          wrote on last edited by
          #3

          I got dumpbin by installing Visual Studio and the "Desktop development with C++" workload with the Visual Studio Installer. Then I found dumpbin.exe and modified the path. So that error went away.

          Still has similar errors with nuitka though. Way over my head how to fix those.

          cmd

          (env) C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy>pyside6-deploy
          Traceback (most recent call last):
            File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\nuitka\__main__.py", line 206, in <module>
              main()
              ~~~~^^
            File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\nuitka\__main__.py", line 188, in main
              MainControl.main()
              ~~~~~~~~~~~~~~~~^^
            File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\nuitka\MainControl.py", line 1160, in main
              _main()
              ~~~~~^^
            File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\nuitka\MainControl.py", line 999, in _main
              main_module = _createMainModule()
            File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\nuitka\MainControl.py", line 146, in _createMainModule
              main_module = buildMainModuleTree(
                  source_code=None,
              )
            File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\nuitka\tree\Building.py", line 1186, in buildMainModuleTree
              module.setStandardLibraryModules(
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
                  early_module_names=detectEarlyImports(),
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  stdlib_modules_names=detectStdlibAutoInclusionModules(),
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              )
              ^
            File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\nuitka\nodes\ModuleNodes.py", line 961, in setStandardLibraryModules
              assert finding != "not-found", early_module_name
                     ^^^^^^^^^^^^^^^^^^^^^^
          AssertionError: collections.abc
          [DEPLOY] Exception occurred: Traceback (most recent call last):
            File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\PySide6\scripts\deploy_lib\commands.py", line 27, in run_command
              subprocess.check_call(command, shell=is_windows)
              ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "C:\Users\mldic\AppData\Local\Programs\Python\Python313\Lib\subprocess.py", line 419, in check_call
              raise CalledProcessError(retcode, cmd)
          subprocess.CalledProcessError: Command '[WindowsPath('C:/Users/mldic/Documents/GitHub/BEMinstructionals.github.io/dev/testing_deploy/env/Scripts/python.exe'), '-m', 'nuitka', 'C:\\Users\\mldic\\Documents\\GitHub\\BEMinstructionals.github.io\\dev\\testing_deploy\\main.py', '--follow-imports', '--enable-plugin=pyside6', '--output-dir=C:\\Users\\mldic\\Documents\\GitHub\\BEMinstructionals.github.io\\dev\\testing_deploy\\deployment', '--quiet', '--noinclude-qt-translations', '--onefile', '--noinclude-dlls=*.cpp.o', '--noinclude-dlls=*.qsb', '--windows-icon-from-ico=C:\\Users\\mldic\\Documents\\GitHub\\BEMinstructionals.github.io\\dev\\testing_deploy\\env\\Lib\\site-packages\\PySide6\\scripts\\deploy_lib\\pyside_icon.ico', '--include-qt-plugins=networkinformation,platforminputcontexts,position,qmltooling']' returned non-zero exit status 1.
          
          During handling of the above exception, another exception occurred:
          
          Traceback (most recent call last):
            File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\PySide6\scripts\deploy.py", line 152, in main
              command_str = nuitka.create_executable(source_file=config.source_file,
                                                     extra_args=config.extra_args,
              ...<5 lines>...
                                                     permissions=config.permissions,
                                                     mode=config.mode)
            File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\PySide6\scripts\deploy_lib\nuitka_helper.py", line 178, in create_executable
              command_str, _ = run_command(command=command, dry_run=dry_run)
                               ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\PySide6\scripts\deploy_lib\commands.py", line 33, in run_command
              raise RuntimeError(
              ...<2 lines>...
              )
          RuntimeError: [DEPLOY] Command C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Scripts\python.exe -m nuitka C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\main.py --follow-imports --enable-plugin=pyside6 --output-dir=C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\deployment --quiet --noinclude-qt-translations --onefile --noinclude-dlls=*.cpp.o --noinclude-dlls=*.qsb --windows-icon-from-ico=C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\PySide6\scripts\deploy_lib\pyside_icon.ico --include-qt-plugins=networkinformation,platforminputcontexts,position,qmltooling failed with error Command '[WindowsPath('C:/Users/mldic/Documents/GitHub/BEMinstructionals.github.io/dev/testing_deploy/env/Scripts/python.exe'), '-m', 'nuitka', 'C:\\Users\\mldic\\Documents\\GitHub\\BEMinstructionals.github.io\\dev\\testing_deploy\\main.py', '--follow-imports', '--enable-plugin=pyside6', '--output-dir=C:\\Users\\mldic\\Documents\\GitHub\\BEMinstructionals.github.io\\dev\\testing_deploy\\deployment', '--quiet', '--noinclude-qt-translations', '--onefile', '--noinclude-dlls=*.cpp.o', '--noinclude-dlls=*.qsb', '--windows-icon-from-ico=C:\\Users\\mldic\\Documents\\GitHub\\BEMinstructionals.github.io\\dev\\testing_deploy\\env\\Lib\\site-packages\\PySide6\\scripts\\deploy_lib\\pyside_icon.ico', '--include-qt-plugins=networkinformation,platforminputcontexts,position,qmltooling']' returned non-zero exit status 1. and return_code1
          
          ERROR:root:[DEPLOY] Executable not found at C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\deployment\main.exe
          

          pysidedeploy.spec

          [app]
          
          # title of your application
          title = pyside_app_demo
          
          # project directory. the general assumption is that project_dir is the parent directory
          # of input_file
          project_dir = C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy
          
          # source file path
          input_file = C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\main.py
          
          # directory where the executable output is generated
          exec_directory = .
          
          # path to .pyproject project file
          project_file = 
          
          # application icon
          icon = C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\PySide6\scripts\deploy_lib\pyside_icon.ico
          
          [python]
          
          # python path
          python_path = C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Scripts\python.exe
          
          # python packages to install
          packages = Nuitka==2.5.1
          
          # buildozer = for deploying Android application
          android_packages = buildozer==1.5.0,cython==0.29.33
          
          [qt]
          
          # comma separated path to qml files required
          # normally all the qml files required by the project are added automatically
          qml_files = 
          
          # excluded qml plugin binaries
          excluded_qml_plugins = 
          
          # qt modules used. comma separated
          modules = QmlModels,Network,QuickWidgets,Widgets,Gui,WebEngineCore,Positioning,PrintSupport,Quick,Core,OpenGL,WebEngineWidgets,Qml,WebChannel,QmlWorkerScript,QmlMeta
          
          # qt plugins used by the application. only relevant for desktop deployment. for qt plugins used
          # in android application see [android][plugins]
          plugins = scenegraph,networkinformation,printsupport,egldeviceintegrations,accessiblebridge,platforms/darwin,platforminputcontexts,xcbglintegrations,tls,generic,iconengines,qmltooling,platformthemes,imageformats,networkaccess,platforms,position,styles
          
          [android]
          
          # path to pyside wheel
          wheel_pyside = 
          
          # path to shiboken wheel
          wheel_shiboken = 
          
          # plugins to be copied to libs folder of the packaged application. comma separated
          plugins = 
          
          [nuitka]
          
          # usage description for permissions requested by the app as found in the info.plist file
          # of the app bundle
          # eg = extra_args = --show-modules --follow-stdlib
          macos.permissions = 
          
          # mode of using nuitka. accepts standalone or onefile. default is onefile.
          mode = onefile
          
          # (str) specify any extra nuitka arguments
          extra_args = --quiet --noinclude-qt-translations
          
          [buildozer]
          
          # build mode
          # possible options = [release, debug]
          # release creates an aab, while debug creates an apk
          mode = debug
          
          # contrains path to pyside6 and shiboken6 recipe dir
          recipe_dir = 
          
          # path to extra qt android jars to be loaded by the application
          jars_dir = 
          
          # if empty uses default ndk path downloaded by buildozer
          ndk_path = 
          
          # if empty uses default sdk path downloaded by buildozer
          sdk_path = 
          
          # other libraries to be loaded. comma separated.
          # loaded at app startup
          local_libs = 
          
          # architecture of deployed platform
          # possible values = ["aarch64", "armv7a", "i686", "x86_64"]
          arch = 
          

          nuitka-crash-report.xml

          <?xml version='1.0' encoding='utf8'?>
          <nuitka-compilation-report nuitka_version="2.5.1" nuitka_commercial_version="not installed" completion="exception">
            <exception exception_type="AssertionError" exception_value="collections.abc">
          Traceback (most recent call last):
            File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\nuitka\MainControl.py", line 1160, in main
              _main()
              ~~~~~^^
            File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\nuitka\MainControl.py", line 999, in _main
              main_module = _createMainModule()
            File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\nuitka\MainControl.py", line 146, in _createMainModule
              main_module = buildMainModuleTree(
                  source_code=None,
              )
            File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\nuitka\tree\Building.py", line 1186, in buildMainModuleTree
              module.setStandardLibraryModules(
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
                  early_module_names=detectEarlyImports(),
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  stdlib_modules_names=detectStdlibAutoInclusionModules(),
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              )
              ^
            File "C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\nuitka\nodes\ModuleNodes.py", line 961, in setStandardLibraryModules
              assert finding != "not-found", early_module_name
                     ^^^^^^^^^^^^^^^^^^^^^^
          AssertionError: collections.abc
          </exception>
            <performance>
              <memory_usage name="after_launch" value="39583744" />
            </performance>
            <data_composer blob_size="None" />
            <command_line>
              <option value="C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\main.py" />
              <option value="--follow-imports" />
              <option value="--enable-plugin=pyside6" />
              <option value="--output-dir=C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\deployment" />
              <option value="--quiet" />
              <option value="--noinclude-qt-translations" />
              <option value="--onefile" />
              <option value="--noinclude-dlls=*.cpp.o" />
              <option value="--noinclude-dlls=*.qsb" />
              <option value="--windows-icon-from-ico=C:\Users\mldic\Documents\GitHub\BEMinstructionals.github.io\dev\testing_deploy\env\Lib\site-packages\PySide6\scripts\deploy_lib\pyside_icon.ico" />
              <option value="--include-qt-plugins=networkinformation,platforminputcontexts,position,qmltooling" />
            </command_line>
            <plugins>
              <plugin name="anti-bloat" user_enabled="no" />
              <plugin name="data-files" user_enabled="no" />
              <plugin name="delvewheel" user_enabled="no" />
              <plugin name="dll-files" user_enabled="no" />
              <plugin name="eventlet" user_enabled="no" />
              <plugin name="gevent" user_enabled="no" />
              <plugin name="gi" user_enabled="no" />
              <plugin name="glfw" user_enabled="no" />
              <plugin name="implicit-imports" user_enabled="no" />
              <plugin name="kivy" user_enabled="no" />
              <plugin name="matplotlib" user_enabled="no" />
              <plugin name="multiprocessing" user_enabled="no" />
              <plugin name="options-nanny" user_enabled="no" />
              <plugin name="pbr-compat" user_enabled="no" />
              <plugin name="pkg-resources" user_enabled="no" />
              <plugin name="playwright" user_enabled="no" />
              <plugin name="pyside6" user_enabled="yes" />
              <plugin name="pywebview" user_enabled="no" />
              <plugin name="spacy" user_enabled="no" />
              <plugin name="transformers" user_enabled="no" />
            </plugins>
            <distributions />
            <python python_exe="${sys.prefix}\Scripts\python.exe" python_flavor="CPython Official" python_version="3.13.12" os_name="Windows" os_release="11" arch_name="x86_64" filesystem_encoding="utf-8">
              <search_path>
                <path value="${cwd}" />
                <path value="${sys.real_prefix}\DLLs" />
                <path value="${sys.real_prefix}\Lib" />
                <path value="${sys.real_prefix}" />
                <path value="${sys.prefix}" />
                <path value="${sys.prefix}\Lib\site-packages" />
              </search_path>
            </python>
            <output run_filename="${cwd}\deployment\main.exe" />
          </nuitka-compilation-report>
          

          I haven't found much on pyside6-deploy, and running with nuikta directly gets the same trace.

          Getting WebEngine into an installer is difficult because there's a separate executable and other things for Chromium. Some people have had success by manually copying some files rather than relying on a tool like pyside6-deploy. I'd rather not do that though.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            Mitchal Dichter
            wrote on last edited by
            #4

            So not exactly a solution, but pyinstaller on windows is working at this time, although it often breaks with new releases of pyside and different operating systems.

            Including all the stuff for WebEngine is a chronic problem for things like nuitka and pyinstaller because pyside can change the location of WebEngine stuff and different operating systems need stuff in different places. Code signing is also a chronic problem.

            1 Reply Last reply
            1
            • M Mitchal Dichter has marked this topic as solved on

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved