Description
Not sure if this is out of scope... but I figured I'd still report it so others can find the workaround.
When using PyInstaller to freeze a Python script into an .exe file on Windows, this code will yield an error when executing the frozen application:
from PySide2 import QtUiTools
The error:
Traceback (most recent call last): File "main.py", line 18, in <module> from PySide2 import QtUiTools File "c:\users\fredrik\code\test\venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 714, in load_module module = loader.load_module(fullname) ImportError: could not import module 'PySide2.QtXml'
Workaround: before importing QtUiTools, first import QtXml.