PySide6 ImportError
-
Hello everyone! I’m hoping to get some advice on an issue I’m facing with PySide6 in a Conda environment.
I’m working on a PySide6 application and initially installed PySide6 via Conda. Unfortunately, this package didn't include pyside6-addons, which I need. So, I installed the missing parts with pip install.
That's when I ran into this error:
ImportError: DLL load failed while importing QtWebEngineWidgets: The specified module could not be found.
I looked for fixes and found that reinstalling could help, so I tried completely installing PySide6 with pip instead. However, this introduced a new error:
qt.qpa.plugin: Could not load the Qt platform plugin "windows" in "" even though it was found. Available platform plugins are: direct2d, minimal, offscreen, windows.
For context, I’m using Qt 6.7.3 and working in PyCharm.
I’d be grateful for any suggestions on how to resolve this.
Thank you in advance for any help! -
Hello everyone! I’m hoping to get some advice on an issue I’m facing with PySide6 in a Conda environment.
I’m working on a PySide6 application and initially installed PySide6 via Conda. Unfortunately, this package didn't include pyside6-addons, which I need. So, I installed the missing parts with pip install.
That's when I ran into this error:
ImportError: DLL load failed while importing QtWebEngineWidgets: The specified module could not be found.
I looked for fixes and found that reinstalling could help, so I tried completely installing PySide6 with pip instead. However, this introduced a new error:
qt.qpa.plugin: Could not load the Qt platform plugin "windows" in "" even though it was found. Available platform plugins are: direct2d, minimal, offscreen, windows.
For context, I’m using Qt 6.7.3 and working in PyCharm.
I’d be grateful for any suggestions on how to resolve this.
Thank you in advance for any help!@JamesAndrei-DG Set QT_DEBUG_PLUGINS environment variable before launching your app in terminal and check the output - it should provide more details about the issue.
See https://doc.qt.io/qt-6/debug.html for more details. -
I’m seeing the following log. Also, I’m using Windows
qt.core.plugin.factoryloader: checking directory path "D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms" ... qt.core.plugin.factoryloader: looking at "D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qdirect2d.dll" qt.core.plugin.loader: Found metadata in lib D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qdirect2d.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "direct2d" ] }, "archlevel": 1, "className": "QWindowsDirect2DIntegrationPlugin", "debug": false, "version": 395008 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("direct2d") qt.core.plugin.factoryloader: looking at "D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qminimal.dll" qt.core.plugin.loader: Found metadata in lib D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qminimal.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimal" ] }, "archlevel": 0, "className": "QMinimalIntegrationPlugin", "debug": false, "version": 395008 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("minimal") qt.core.plugin.factoryloader: looking at "D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qoffscreen.dll" qt.core.plugin.loader: Found metadata in lib D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qoffscreen.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "offscreen" ] }, "archlevel": 0, "className": "QOffscreenIntegrationPlugin", "debug": false, "version": 395008 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("offscreen") qt.core.plugin.factoryloader: looking at "D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qwindows.dll" qt.core.plugin.loader: Found metadata in lib D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qwindows.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "windows" ] }, "archlevel": 0, "className": "QWindowsIntegrationPlugin", "debug": false, "version": 395008 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("windows") qt.core.plugin.factoryloader: checking directory path "D:/MiniForge/envs/test/envs/test/platforms" ... qt.core.library: "D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qwindows.dll" cannot load: Cannot load library D:\MiniForge\envs\test\Library\lib\qt6\plugins\platforms\qwindows.dll: The specified procedure could not be found. qt.core.plugin.loader: QLibraryPrivate::loadPlugin failed on "D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qwindows.dll" : "Cannot load library D:\\MiniForge\\envs\\test\\Library\\lib\\qt6\\plugins\\platforms\\qwindows.dll: The specified procedure could not be found." qt.qpa.plugin: Could not load the Qt platform plugin "windows" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: direct2d, minimal, offscreen, windows.
-
I’m seeing the following log. Also, I’m using Windows
qt.core.plugin.factoryloader: checking directory path "D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms" ... qt.core.plugin.factoryloader: looking at "D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qdirect2d.dll" qt.core.plugin.loader: Found metadata in lib D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qdirect2d.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "direct2d" ] }, "archlevel": 1, "className": "QWindowsDirect2DIntegrationPlugin", "debug": false, "version": 395008 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("direct2d") qt.core.plugin.factoryloader: looking at "D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qminimal.dll" qt.core.plugin.loader: Found metadata in lib D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qminimal.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimal" ] }, "archlevel": 0, "className": "QMinimalIntegrationPlugin", "debug": false, "version": 395008 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("minimal") qt.core.plugin.factoryloader: looking at "D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qoffscreen.dll" qt.core.plugin.loader: Found metadata in lib D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qoffscreen.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "offscreen" ] }, "archlevel": 0, "className": "QOffscreenIntegrationPlugin", "debug": false, "version": 395008 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("offscreen") qt.core.plugin.factoryloader: looking at "D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qwindows.dll" qt.core.plugin.loader: Found metadata in lib D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qwindows.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "windows" ] }, "archlevel": 0, "className": "QWindowsIntegrationPlugin", "debug": false, "version": 395008 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("windows") qt.core.plugin.factoryloader: checking directory path "D:/MiniForge/envs/test/envs/test/platforms" ... qt.core.library: "D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qwindows.dll" cannot load: Cannot load library D:\MiniForge\envs\test\Library\lib\qt6\plugins\platforms\qwindows.dll: The specified procedure could not be found. qt.core.plugin.loader: QLibraryPrivate::loadPlugin failed on "D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qwindows.dll" : "Cannot load library D:\\MiniForge\\envs\\test\\Library\\lib\\qt6\\plugins\\platforms\\qwindows.dll: The specified procedure could not be found." qt.qpa.plugin: Could not load the Qt platform plugin "windows" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: direct2d, minimal, offscreen, windows.
@JamesAndrei-DG said in PySide6 ImportError:
D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qwindows.dll
Something is wrong with that lib.
-
I figured something out. I created a new conda environment with only Python 3.11 and installed PySide 6.7.3 via pip, and now everything works fine. It seems the issue was due to conflicts with other libraries.
The error comes from this setup, my conda environment has only Python 3.11, easyocr, folium, numpy, and OpenCV, with PySide6 installed through pip.On the other hand, I could install pyside6 with my conda environment and it will work fine. But i try to install pyside6-addons using pip it leads to this
ImportError: DLL load failed while importing QtWebEngineWidgets: The specified module could not be found.
-
I figured something out. I created a new conda environment with only Python 3.11 and installed PySide 6.7.3 via pip, and now everything works fine. It seems the issue was due to conflicts with other libraries.
The error comes from this setup, my conda environment has only Python 3.11, easyocr, folium, numpy, and OpenCV, with PySide6 installed through pip.On the other hand, I could install pyside6 with my conda environment and it will work fine. But i try to install pyside6-addons using pip it leads to this
ImportError: DLL load failed while importing QtWebEngineWidgets: The specified module could not be found.
-
Yes I installed it using pip with the PySide6-addons, which include the QtWebEngineWidgets module.
For now, I managed to get it working by switching to a venv environment instead of conda, and everything worked smoothly. It seems like using conda with pip might be causing some libraries to get removed or overwritten.