2
votes

I created an exe file using PyInstaller and it works on my PC with Windows 8.1 and laptop with Windows 10, but on computers with Windows 7 it has error

"error loading python37 dll " and something about dynamic linked libraries.

EDIT: Error loading Python DLL 'C:\Users\Dell\Appdata\Local|Temp|_MEI16442\python37.dll'. LoadLibrary: Procedure of initialize dynamic linked library (DLL) failed. It is translated from Polish

Do you know maybe how can I fix it? I was reading about static linked dll but I dont know how to do it. I am working on Windows only, I dont know Linux/Mac.

2
Post the full traceback. "something about dynamic linked libraries" is not helpful.Justin Ezequiel
Does this help?Random Davis
Error loading Python DLL 'C:\Users\Dell\Appdata\Local|Temp|_MEI16442\python37.dll'. LoadLibrary: Procedure of initialize dynamic linked library (DLL) failed. It is translated from Polish.Livermorium
I was using .exe from dist directory. So its not the issue.Livermorium
To run Python 3.7 on Windows 7 requires Windows Service Pack 1 and Update KB2533623. Does the target Windows 7 machine have these updates?BoarGules

2 Answers

0
votes

This used to happen to me all the time, and it was always because I tried to run the executable file from the build folder while the one that works is in the dist folder.

0
votes

I had this same issue while compiling the executable with a Pyinstaller command. To fix it, I added the --noupx option and everything worked fine.