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

cx_freeze: cannot find path when using zip_include_packages

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • 6.3.1
    • 6.3.1
    • PySide
    • None
    • Windows

    Description

      I freeze my application with cx_freeze on Windows 10 with the following options:

       

      build_exe_options =

      { "build_exe" : build_path, "excludes" : ["tkinter", "distutils", "html", "unittest", "pydoc", "bz2", "pyexpat", "lzma"], "optimize" : 2, "zip_include_packages" : "*", "zip_exclude_packages" : "" }

       

      Zip include is quite important for me because it brings down the program size to 1/5th. It worked well with PyQt5. However, with PySide6 I get the following error, when trying to start the executable. Everything works well, when placing PySide6 in zip_exclude_packages (which bloats the install size again).

       

      ---------------------------
      cx_Freeze: Python error in main script
      ---------------------------
      Traceback (most recent call last):
      File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\Lib\site-packages\cx_Freeze\initscripts_startup_.py", line 120, in run
      module_init.run(name + "_main_")
      File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\Lib\site-packages\cx_Freeze\initscripts\Console.py", line 16, in run
      exec(code, module_main._dict_)
      File "MyProject.py", line 8, in <module>
      File "<frozen importlib._bootstrap>", line 983, in _find_and_load
      File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
      File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
      File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\PySide6_init_.py", line 143, in <module>
      _all_ = _find_all_qt_modules()
      File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\PySide6_init_.py", line 131, in _find_all_qt_modules
      files = os.listdir(location)
      FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\Users\\User\\Documents\\Workspace\\Projects\\MyProject\\build\\MyProject\\lib\\library.zip
      PySide6'

      Attachments

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

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            falondrian Sascha Worszeck
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes