Hi,
Thanks @bwoodsend and @Chris. Correcting the layout seems to have solved the problem as you envisioned. But I had also to introduce a dedicated "main" script for pyinstaller that I called pyinstmain.py and put in src. It reuses the code of __main__.py in src/yaas, avoiding the use of relative imports, that seems to pose problems as I found in an issue.
I also renamed things to avoid ambiguities (like my yaas.py in yaas folder renamed to app.py).
The import error disappeared. Now I have a dll not found error (below) with the github actions version but it is unrelated. I will investigate before eventualy asking for help.
Best,
Gaël
Traceback (most recent call last):
File "pyinstmain.py", line 1, in <module>
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 378, in exec_module
File "yaas\app.py", line 15, in <module>
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 378, in exec_module
File "yaas\worker.py", line 7, in <module>
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 378, in exec_module
File "torch\__init__.py", line 148, in <module>
raise err
OSError: [WinError 126] Le module spécifié est introuvable. Error loading "C:\Users\Gaël de Chalendar\AppData\Local\Temp\_MEI191802\torch\lib\fbgemm.dll" or one of its dependencies.
Le vendredi 23 août 2024 à 21:59:28 UTC+2, bwoodsend a écrit :