When I try to run any pyqt5 scripts, I get the following error message:
ImportError: DLL load failed while importing QtWidgets: The specified module could not be found.
I’m running Anaconda on a fresh win10 pro 64 bit installation.
conda version: 22.9.0; conda-build version: 3.21.8; python version: 3.9.12.final.0
I did the following things to try to fix the ImportError problem:
conda update conda
conda update pyqt
In a stackOverflow post at python - DLL load failed when importing PyQt5 - Stack Overflow
One person said that the thing that did the trick for him was to copy the python3.dll to virtualenv\scripts\python3.dll
I am not using any virtual environments;
so I copied “C:\ProgramData\Anaconda3\python3.dll” to C:\ProgramData\Anaconda3\Scripts
But that did not do me any good either.
I added C:\ProgramData\Anaconda3 to the Windows environment path variable, but that did not help.
I wonder if I should downgrade to a lower version of python, and if so, to which version?
Any suggestions would be much appreciated.