JackMcKew / pyinstaller-action-windows

Github Action for building executables with Pyinstaller
MIT License
173 stars 71 forks source link

pyinstaller not finding lib #40

Closed patcmorneau closed 4 months ago

patcmorneau commented 9 months ago

First of all, your work is awesome !

But..

When i package my executable with your pyinstaller-action-windows i get an error when i try to execute the generated executable. The error is : ImportError: DLL load failed while importing _network: The specified module could not be found.

so after a bit of digging i found in the github action log these errors :

19205 INFO: Looking for dynamic libraries
1522 WARNING: lib not found: proj-6a9d00a0da816213800e2fe688403951.dll dependency of C:\Python310\lib\site-packages\pyproj\list.cp310-win_amd64.pyd
1535 WARNING: lib not found: proj-6a9d00a0da816213800e2fe688403951.dll dependency of C:\Python310\lib\site-packages\pyproj\database.cp310-win_amd64.pyd
1548 WARNING: lib not found: proj-6a9d00a0da816213800e2fe688403951.dll dependency of C:\Python310\lib\site-packages\pyproj\_transformer.cp310-win_amd64.pyd
1561 WARNING: lib not found: proj-6a9d00a0da816213800e2fe688403951.dll dependency of C:\Python310\lib\site-packages\pyproj\_sync.cp310-win_amd64.pyd
1574 WARNING: lib not found: proj-6a9d00a0da816213800e2fe688403951.dll dependency of C:\Python310\lib\site-packages\pyproj\_network.cp310-win_amd64.pyd
1587 WARNING: lib not found: proj-6a9d00a0da816213800e2fe688403951.dll dependency of C:\Python310\lib\site-packages\pyproj\_geod.cp310-win_amd64.pyd
1600 WARNING: lib not found: proj-6a9d00a0da816213800e2fe688403951.dll dependency of C:\Python310\lib\site-packages\pyproj\_datadir.cp310-win_amd64.pyd
1613 WARNING: lib not found: proj-6a9d00a0da816213800e2fe688403951.dll dependency of C:\Python310\lib\site-packages\pyproj\_crs.cp310-win_amd64.pyd

the warning 1574 seems to be the cause of the error i get when i execute the generated executable

I have a virtual machine with windows that has this configuration:

620 INFO: PyInstaller: 6.3.0
620 INFO: Python: 3.11.1
635 INFO: Platform: Windows-10-10.0.19044-SP0

When i build my executable there, the executable works fine this way

I am packaging with the branch python3-10-pyinstaller-5-3

I feel like it could be an error coming from the python version or coming from the pip install

Heres my repo if you want to have a look : https://github.com/patcmorneau/cloud-point-projection-converterter

I generated the spec file like this so it should collect all the files the executable should need: pyinstaller cloud-point_conv.py --onefile --collect-all pyproj

JackMcKew commented 4 months ago

From the looks of your repo, it ended up working?