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 
<https://www.lfd.uci.edu/~gohlke/pythonlibs/>  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. 

 

Cheers,

 

From: [email protected] <[email protected]> On Behalf Of 
bwoodsend
Sent: Monday, 24 May 2021 9:08 AM
To: PyInstaller <[email protected]>
Subject: Re: [PyInstaller] Re: Exe Not working on different PCs

 

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 
<https://pypi.org/project/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.

​

On Saturday, May 22, 2021 at 7:28:56 PM UTC+1 [email protected] 
<mailto:[email protected]>  wrote:

Have you ever used the venerable Dependency Walker?  It's ancient, but it still 
works for me on Win 10, although it sometimes takes 5-10 minutes to start up 
these days.  Since it's just two files (depends.exe and depends.dll, the .chm 
is just help so you can ignore it), you can easily put it on a USB stick and 
run it on one of the affected machines.

 

https://dependencywalker.com/

 

On Sat, May 22, 2021 at 7:29 AM <[email protected] 
<mailto:[email protected]> > wrote:

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: [email protected] <mailto:[email protected]>  
<[email protected] <mailto:[email protected]> > On Behalf Of 
bwoodsend
Sent: Saturday, 22 May 2021 3:59 AM
To: PyInstaller <[email protected] <mailto:[email protected]> >
Subject: [PyInstaller] Re: Exe Not working on different PCs

 

Running on one PC but not another usually translates as missing a DLL which 
some PCs have already. Are you using Conda? That's a common culprit. And what's 
your PyInstaller version?

-- 
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 
[email protected] <mailto:[email protected]> .
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/56c995a7-e415-47cc-a6e6-473d499f5138n%40googlegroups.com
 
<https://groups.google.com/d/msgid/pyinstaller/56c995a7-e415-47cc-a6e6-473d499f5138n%40googlegroups.com?utm_medium=email&utm_source=footer>
 .

-- 

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 [email protected] <mailto:[email protected]> .
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/014501d74e93%24aa4d2320%24fee76960%24%40gmail.com
 
<https://groups.google.com/d/msgid/pyinstaller/014501d74e93%24aa4d2320%24fee76960%24%40gmail.com?utm_medium=email&utm_source=footer>
 .

-- 
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 
[email protected] 
<mailto:[email protected]> .
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/060c8412-7fc9-4877-9cce-2d42f7b1134en%40googlegroups.com
 
<https://groups.google.com/d/msgid/pyinstaller/060c8412-7fc9-4877-9cce-2d42f7b1134en%40googlegroups.com?utm_medium=email&utm_source=footer>
 .

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/007701d751bf%24a3a60990%24eaf21cb0%24%40gmail.com.

Reply via email to