PySide 6.5.0: Cannot load library qtquick2plugin.dll
Unsolved
Qt for Python
-
__main__.py
import pathlib import sys from PySide6.QtGui import QGuiApplication from PySide6.QtQml import QQmlApplicationEngine from __feature__ import snake_case, true_property # type: ignore # noqa if __name__ == "__main__": app = QGuiApplication(sys.argv) engine = QQmlApplicationEngine() engine.load(str(pathlib.Path(__file__).parent / "welcome.ui.qml"))
welcome.ui.qml:
import QtQuick import QtQuick.Controls import QtQuick.Layouts Window { title: "MyWindow" visible: true RowLayout { anchors.fill: parent Button { text: "B1" } Button { text: "B2" } } }
This results in an error:
QQmlApplicationEngine failed to load component file:///.../welcome.ui.qml:1:1: Cannot load library ...\Lib\site-packages\PySide6\qml\QtQuick\qtquick2plugin.dll: The specified module could not be found.
-
The example works fine here, so, it looks like a broken installation. Have you tried re-creating your virtual environment?
-
@friedemannkleint I tried all that, I tried different versions of virtual environments. Finally I switched over to PyQt6 and now it works flawlessly.