Hello Team,
It's been several days that I block on a problem between PySide2 and cx_freeze...
When I freeze my application, I get the following error when launching the executable:
test-gui.exe
PySide2/__init__.py: Unable to import shiboken2 from L:\dev\PROJECT\bin\windows, L:\dev\PROJECT\bin\windows\lib\library.zip, L:\dev\PROJECT\bin\windows\lib
Traceback (most recent call last):
  File "I:\REF\COTS\PYTHON\V3.8.3\BINARIES\Windows\lib\site-packages\cx_Freeze\initscripts\__startup__.py", line 40, in run
    module.run()
  File "I:\REF\COTS\PYTHON\V3.8.3\BINARIES\Windows\lib\site-packages\cx_Freeze\initscripts\Console.py", line 37, in run
    exec(code, {'__name__': '__main__'})
  File "test-cli.py", line 1, in <module>
  File "<frozen zipimport>", line 259, in load_module
  File "I:\REF\COTS\PYTHON\V3.8.3\BINARIES\Windows\lib\site-packages\PySide2\__init__.py", line 91, in <module>
    _setupQtDirectories()
  File "I:\REF\COTS\PYTHON\V3.8.3\BINARIES\Windows\lib\site-packages\PySide2\__init__.py", line 57, in _setupQtDirectories
    import shiboken2
  File "<frozen zipimport>", line 259, in load_module
  File "I:\REF\COTS\PYTHON\V3.8.3\BINARIES\Windows\lib\site-packages\shiboken2\__init__.py", line 27, in <module>
    from .shiboken2 import *
ImportError: DLL load failed while importing shiboken2: The specified module could not be found.
Everything works fine by directly calling the Python script as follows:
python test-gui.py
I tried with the following version of Pyside2: 5.14.2.1, 5.14.2.2 and 5.14.2.3.
- relates to
- 
                    PYSIDE-1257 cx_freeze: cannot find "libshiboken" when frozen when using zip_include_packages -         
- Closed
 
-