Project scenario:
PyQt5 ImportError: DLL load failed: The specified module could not be found
Pycharm
python version 3.8
Problem Description
Problem: `Due to changing the python version of the previous virtual environment, the error
ImportError: DLL load failed: The specified module could not be found.
Cause Analysis:
Analysis of the problem: It should be that the python3.dll file cannot be read normally after changing python.
solution:
Specific solution: I found many ways, but it was useless to reinstall QT5 until I read this article by Leonadoice.
Specific steps:
Go to the python website to find your own corresponding python version and download it. Mine is python3.8.0. Find Download Windows x86-64 executable installer
will install the corresponding python version. Remember the installation directory, and then copy the python3.dll file in the file to the Anaconda3 directory. If it is in a virtual environment, go to D:\Anaconda3\envs to find it. For your corresponding virtual environment, just replace the python3.dll file in it.