Issue with PyInstaller Executable Not Finding Internal DLL
-
Hello,
I'm using PyInstaller to create an executable for my program. The build process completes successfully, but when I try to run the resulting .exe file, I encounter an error indicating that a specific DLL file cannot be found.
The DLL is located in the internal directory, and I’ve verified that it’s present there. However, for some reason, the executable fails to locate it.
I’ve tried specifying the path to the DLL in the PyInstaller spec file and double-checked that the directory structure is correct, but the issue persists.
What could be causing this, and how can I ensure the DLL is properly detected and used by the executable?
Any advice or troubleshooting steps would be greatly appreciated!
Thank you!
this is the line that get the error:
from PyQt5 import QtWidgets, QtGuiFull Error:
Traceback (most recent call last): File "main.py", line 9, in <module> ImportError: DLL load failed while importing QtWidgets: The specified module could not be found. -
The issue was that I had python311.dll but didn't have python3.dll. Adding the python3.dll file resolved the problem.