Most likely is a missing (but commonly found) DLL on those machines that it doesn't run on - the most likely candidates being those in the MS Redistribable.
One trick that I have found to help is to build the application with a second target set as command line rather than Windows - this results in an executable with the annoying habit of opening a command prompt when running but prevents some of the error messages being shunted to NUL - it is worth a try at least. Another is to try, on one of the machines where your app doesn't run it to try installing python (with it added to the path) then see if your code runs, if it doesn't try pip installing the python packages one by one until it does.
Steve Barnes
--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
pyinstaller...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/pyinstaller/8c1f2a5f-54a3-423e-aa17-5fb7f7d3f15cn%40googlegroups.com.
Thanks for your fast response. I’m not using Conda, standard python. Pyinstaller version 4.1.
Is there a way to detect what DLL is missing when no error is printed? Or where should I be comparing the dll’s between working and not working PCs.
Cheers,
From: pyins...@googlegroups.com <pyins...@googlegroups.com> On Behalf Of bwoodsend
Sent: Saturday, 22 May 2021 3:59 AM
To: PyInstaller <pyins...@googlegroups.com>
--
You received this message because you are subscribed to a topic in the Google Groups "PyInstaller" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pyinstaller/A-aqJ8JIpdE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pyinstaller...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/56c995a7-e415-47cc-a6e6-473d499f5138n%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyinstaller...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/014501d74e93%24aa4d2320%24fee76960%24%40gmail.com.
We’ve recently had to expand the list of Windows DLLs to be collected by default. The new ones to look out for are:
msvcp140_1.dll
msvcp140_2.dll
vcruntime140_1.dll
vcomp140.dll
I’d guess that it’s either one of those or one of the tiny win-crt-api.dll
DLLs.
I’d ditto the suggestion to try using Dependency Walker. Or you can use psutil. Put this at the end of your code:
import psutil
# Get this process i.e. Python.
process = psutil.Process()
# Print all loaded DLLs.
for i in process.memory_maps():
print(i.path)
In either case, there will be a fair amount of sifting through file names and guess work required to find the DLL you don’t have.
Thanks for your help everyone I now have the exe working all PC’s.
I tried DependencyWalker which didn’t find anything useful, but using psutil was able to find the missing DLL’s and pyd files.
Numpy and GDAL (osgeo) were the source of the missing libraries. I’m using numpy +mkl 1.19.4 downloaded from Christoph Gohlke’s page and
GDAL 3.2.1 from the same site.
In both cases some but not all required libraries were collected during the build, ones not collected were:
numpy\DLLs\mkl_def.dll
numpy\DLLs\mkl_core.dll
numpy\DLLs\mkl_vml_def.dll
numpy\DLLs\mkl_intel_thread.dll – the exe didn’t run on any PC without this DLL
numpy\DLLs\mkl_vml_def.dll
numpy\DLLs\libiomp5md.dll
numpy\DLLs\tbbmalloc.dll
osgeo\_osr.cp39-win_amd64.pyd
osgeo\_ogr.cp39-win_amd64.pyd
osgeo\_gdalconst.cp39-win_amd64.pyd
The osgeo\data\proj folder is also NOT copied during the build.
Was also missing
tcl\reg1.3\tclreg13.dll
Not sure if all these were required, but I included all these as “datas” for my build.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/060c8412-7fc9-4877-9cce-2d42f7b1134en%40googlegroups.com.