Fix Matplotlib/PyQT ImportError DLL Load failed
If upon
from matplotlib.pyplot import figure
or
from PyQt5 import QtCore
occurs error
ImportError: DLL load failed: the specified procedure could not be found
Fix
Workaround by updating PyQt5 with pip
instead of conda
.
This is since conda
had Qt 5.6 (conda install pyqt qt
), which didn’t work.
But pip
had Qt 5.9, which worked for me.
Check that (for Windows) that
echo %PATH%
includes C:\Miniconda\Library\bin
where Qt5Core.dll
resides.
If so, then try updating PyQt and Qt library
conda install pyqt qt
If the same error still occurs, try going to the latest PyQt5 from Pip.
pip install pyqt5