Pyinstaller problem with a module that uses torch and pytorch_lightning. #7944
Unanswered
Caio-Giulio-Cesare
asked this question in
Help
Replies: 1 comment 7 replies
-
|
What version of PyInstaller and pyinstaller-hooks-contrib are you using? |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment



Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone, I can't create an executable with pyinstaller when I use a module that itself uses torch and pytorch_lightning.
The script ( main.py ) basically does nothing except import that module.
The first problem occurs during the creation phase, but this problem, as suggested by the creation phase, is resolved by adding the following line to the main.spec file
import sys ; sys.setrecursionlimit(sys.getrecursionlimit() * 5)
and launching the command
pyinstaller main.spec
But even in this case, although the executable is created, it does not work.
I attach the exe_error_.jpg file with the error details.
Even trying to create the executable not in "onefile mode" the resulting executable does not work.
I tried to apply the indications found in previous discussions but I didn't solve it.
Has this problem happened to anyone?
Is there a way to fix and create the executable?
Thanks to anyone who wants to help me.
Beta Was this translation helpful? Give feedback.
All reactions