0
votes

I'm using pyinstaller v4.0 to create a --onefile for execution on Win 7 and Win 10 machines. Win 7 machines can be either 32 or 64 bit. The ONLY version of python installed on the machine I'm using to build the .exe (run pyinstaller on) is Python v3.7.9 32 bit. To create the .exe I'm simply using:

pyinstaller --onefile scriptname.py

I copy the resulting .exe from the pyinstaller dist folder to both Win 7 and Win 10 machines and, in most cases, it runs just fine; but on 3 separate machines when I try to run the .exe it throws this error:

"Error loading Python DLL 'C:\Users\username\AppData\Local\Temp_MEI3dddd\python37.dll'. LoadLibrary: The specified module could not be found."

Note that 'dddd' referenced above can be differing 4 digits on different machines.

I have confirmed that the directory from the path, "_MEI3dddd", DOES get unpacked to the Temp directory, I've even been able to open the the "_MEI3dddd" directory long enough to see that python37.dll is in there.

I have confirmed permissions on the folders in the path are correct to allow the executing user full access.

Can anyone suggest what I am missing?

1

1 Answers

0
votes

I found my fix. To resolve the issue, I spun up a VM with a Win 7 SP1 32 bit OS, installed Python 3.7.9 32 bit and pyinstaller. From there it was just a matter of building the --onefile on that VM and copying the resulting .exe from the pyinstaller dist folder to the other target machines.