1

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,

6
  • Python wasn't created to make .exe and programs like PyInstaller sometimes have problem to find all needed Python modules and C/C++ libraries (.dll). It may need to manually add missing file to config file .spec before running PyInstaller. Using Spec Files — PyInstaller 6.16.0 documentation, When Things Go Wrong — PyInstaller 6.16.0 documentation Commented Sep 18 at 19:55
  • Thanks, but I have the same issue when I do not use PyInstaller and I run the script with python.exe. So there is another problem. Commented Sep 19 at 12:23
  • if you have the same problem before using pyinstaller then maybe remove information about pyinstaller because pyinstaller can be missleading in this problem. Commented Sep 19 at 13:18
  • Was pretty clear but I did it anyway. Thanks Commented Sep 19 at 14:47
  • I'm not familiar with QT, but is your issue similar to that one? stackoverflow.com/questions/65746847/… Commented Sep 22 at 5:32

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.