In my case, I had 32-bit Windows 10 and Python 3.7.2. Using PyQt5 5.11 installed via pip, I got this error:
from PyQt5.QtWidgets import QApplication Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: DLL load failed: The specified module could not be found.
I noticed that version 5.11 comes without Qt libraries, so I reinstalled the earlier version using python -m pip uninstall PyQt5 and python -m pip install PyQt5==5.10
Never use --no-cache-dir, as this will result in a confirmation error when installing the whl file:
assert building_is_possible assertion Error
I finished installing 5.10 and received the following error:
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.
After setting QT_DEBUG_PLUGINS and even the path to the plugin with:
set QT_DEBUG_PLUGINS= set QT_PLUGIN_PATH=C:\Python37-32\Lib\site-packages\PyQt5\Qt\plugins
I realized that the qwindows.dll dll was found in the correct path where it is located.
TL; DR: I restarted my Qt script in python with a rise in UAC, and I think it worked !
Orsiris de jong
source share