DLL load failed while importing QtWebEngineWidgets:
Hi! I have created an environment in conda, installed thy phy in there, but I still cannot open the template gui. I always get the following error. Uninstalling and reinstalling of the QtWebEngineWidgets doesn't help. Could you help me to solve the problem? Thanks!
(phy2) C:\Users\dmitry.kobylkov\MATLAB\Projects\KilosortPLX\Outputs-chick46_160622_1.7.pl213-Sep-2022>phy template-gui params.py --debug
Traceback (most recent call last):
File "C:\Users\dmitry.kobylkov\.conda\envs\phy2\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\dmitry.kobylkov\.conda\envs\phy2\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\dmitry.kobylkov\.conda\envs\phy2\Scripts\phy.exe\__main__.py", line 4, in <module>
File "C:\Users\dmitry.kobylkov\.conda\envs\phy2\lib\site-packages\phy\apps\__init__.py", line 22, in <module>
from phy.gui.qt import QtDialogLogger
File "C:\Users\dmitry.kobylkov\.conda\envs\phy2\lib\site-packages\phy\gui\__init__.py", line 6, in <module>
from .qt import (
File "C:\Users\dmitry.kobylkov\.conda\envs\phy2\lib\site-packages\phy\gui\qt.py", line 41, in <module>
from PyQt5.QtWebEngineWidgets import (QWebEngineView, # noqa
ImportError: DLL load failed while importing QtWebEngineWidgets: The specified module could not be found.
I am having the same error as of 9/21. I am able to run phy successfully on this machine in a different environment but when I install the developer version I get this error. Uninstalling and reinstalling PyQtWebEngine didn't help.
C:\Users\mh553\Phy\phylib-master\phylib-master>phy template-gui params.py
Traceback (most recent call last):
File "C:\Users\mh553\Anaconda3\envs\ForPhyllum\Scripts\phy-script.py", line 33, in
A colleague had the same problem which we were able to fix:
pip uninstall PyQt5 pip uninstall PyQt5-sip pip uninstall PyQtWebEngine
pip install --upgrade pyqtwebengine==5.12 pip install --upgrade pyqt5==5.12.3
(the specific versions listed above were the lowest ones pypi was offering at the time)
You may need to manually remove the PyQt folders in Lib\site-packages and repeat the above steps but we didn't need to.
Hello,
A colleague and I are having a similar error as of 12/8/22 (see attached), apparently with the PyQt5 and PyQTWebEngine packages. We tried performing a completely fresh install and following the instructions above, i.e. uninstalling and reinstalling earlier versions of pyqt5 and pyqtwebengine , to no avail.
Has there been a developer update for this issue?

I finally found a solution that worked for my colleague and I.
Order of events:
-
Install Anaconda
-
Create an Anaconda environment with the major dependencies. The earlier versions of pyqt5/pyqt5-sip/pyqtwebengine are not available when installing, so I withheld the "pyqt" install for a later pip install.
conda create -n phy2 python=3.7 pip numpy matplotlib scipy scikit-learn h5py cython pillow -y
- Confirm that there are no pyqt related packages. If there are, then use the conda uninstall commands to remove them.
conda list
- Use pip to install the earliest possible recommended version of pyqt. Note that "pqt5" must be installed before the webengine. Otherwise the later version of pyqt5 is installed as part of the dependencies of the webengine, and installing the earlier version over it still results in the DLL load failure error seen above.
pip install pyqt5==5.12.1 pip install pyqtwebengine==5.12
using conda list also shows that ppyqt5-sip 4.19.19 is installed
- Proceed to install phy and run it as usual.
pip install phy --pre --upgrade
It worked beautifully, thanks hwehry!!!
@hwehry Thank you for your suggestions. It did the job!
Thanks hwehry, this was the best solution to solve my issue as well!