burntchowmein
burntchowmein

Reputation: 469

How do you fix this error: "ImportError: DLL load failed: The specified module could not be found." using PyQt5

I am currently using Python 3.6.8 and PyQt5. My program was working fine but after a Windows Update, everything stopped working.

Here is the error:

Traceback (most recent call last):
  File "main.py", line 10, in <module>
    from PyQt5 import QtWidgets, QtCore, QtGui
ImportError: DLL load failed: The specified module could not be found.

Upvotes: 3

Views: 19197

Answers (3)

graj499
graj499

Reputation: 87

Change your interpreter you are using in the IDE i.e. use the same version of python which is running in your cmd prompt. This solved my error.

Upvotes: 0

burntchowmein
burntchowmein

Reputation: 469

I fixed this error by running the following command on my command prompt:

pip install pyqt5-tools

Upvotes: 5

AzyCrw4282
AzyCrw4282

Reputation: 7744

It looks like the environment variables have become corrupt after the update. In the simplest case, it should just be

Adding your DLL location of python, for example,

(C:\Program Files\Python35\DLLs)

in the path in Environment variables. You can also see some others possible solutions here

Upvotes: 1

Related Questions