I am trying to have a bootable USB stick that starts a python app with a Qt interface. I get an error on loading QtCore :
# code object from 'X:\\Python313\\Lib\\__pycache__\\string.cpython-313.pyc'
import '_string' # <class '_frozen_importlib.BuiltinImporter'>
import 'string' # <_frozen_importlib_external.SourceFileLoader object at 0x0000028D33B104D0>
import 'atexit' # <class '_frozen_importlib.BuiltinImporter'>
import 'logging' # <_frozen_importlib_external.SourceFileLoader object at 0x0000028D336B5A90>
import 'shibokensupport.signature.lib.pyi_generator' # <signature_bootstrap.EmbeddableZipImporter object at 0x0000028D335F41A0>
import 'shibokensupport.signature.loader' # <signature_bootstrap.EmbeddableZipImporter object at 0x0000028D335F41A0>
# extension module 'shiboken6.Shiboken' loaded from 'X:\\Python313\\Lib\\site-packages\\shiboken6\\Shiboken.pyd'
# extension module 'shiboken6.Shiboken' executed from 'X:\\Python313\\Lib\\site-packages\\shiboken6\\Shiboken.pyd'
import 'shiboken6.Shiboken' # <_frozen_importlib_external.ExtensionFileLoader object at 0x0000028D31D7B820>
import 'shiboken6' # <_frozen_importlib_external.SourceFileLoader object at 0x0000028D31D463F0>
import 'PySide6' # <_frozen_importlib_external.SourceFileLoader object at 0x0000028D31647C50>
Traceback (most recent call last):
File "X:\windows\pythonUITest\Test.py", line 4, in <module>
from PySide6 import QtCore
File "<frozen importlib._bootstrap>", line 1415, in _handle_fromlist
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 921, in _load_unlocked
File "<frozen importlib._bootstrap>", line 813, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1320, in create_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
ImportError: DLL load failed while importing QtCore: The specified procedure could not be found.
I use WinPE v 10.0.14393.0
Any idea what could be the issue ?
Best,
PyInstallersometimes have problem to find all needed Python modules and C/C++ libraries (.dll). It may need to manually add missing file to config file.specbefore runningPyInstaller. Using Spec Files — PyInstaller 6.16.0 documentation, When Things Go Wrong — PyInstaller 6.16.0 documentationpyinstallerthen maybe remove information aboutpyinstallerbecausepyinstallercan be missleading in this problem.