close

[Solved] DLL load failed when importing PyQt5

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error DLL load failed when importing PyQt5 in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How DLL load failed when importing PyQt5 Error Occurs?

Today I get the following error DLL load failed when importing PyQt5 in python.

How To Solve DLL load failed when importing PyQt5 Error ?

  1. How To Solve DLL load failed when importing PyQt5 Error ?

    To Solve DLL load failed when importing PyQt5 Error It is because of missing Python3.dll (stub dll, that re-exports Python3x.dll functions, so that one version of extension can work for multiple versions of python).

  2. DLL load failed when importing PyQt5

    To Solve DLL load failed when importing PyQt5 Error It is because of missing Python3.dll (stub dll, that re-exports Python3x.dll functions, so that one version of extension can work for multiple versions of python).

Solution 1

It is because of missing Python3.dll (stub dll, that re-exports Python3x.dll functions, so that one version of extension can work for multiple versions of python).

If your Python distro doesn’t bundle python3.dll, you can try one from WinPython

At least the 2017/04/01 versions should have it.

1) Download WinPython (‘Zero’ version suffices; must be same “main version” – 3.5/3.6 -and “bitness” – 32/64 – as your Python !!!).

2) Extract to some temp directory, take the python3.dll and stick it into your python dir, next to the python3x.dll.

3) Enjoy working QT

Solution 2

I know the topic is old but I have also had this problem with the newest version of PyQT 5.11 but I’ve downgraded it to 5.9 via:

pip install PyQT5==5.9

and it has solved the issue.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read