Popen executable fails to find dll, need help to wrap it in SetDllDirectory calls #8125
-
I need to use Popen from a onefile executable on Windows and am affected by #3795 I think I can just call SetDllDirectory (NULL) before running the child process and then run SetDllDirectory (extraction_path) after, but there isn't a clean way to do so - that I can figure it out. I can't even figure it out how to get the extraction path. Essentially I would like to SetDllDirectory to NULL, call Popen and later after Popen is finished SetDllDirectory back to what it was. My Popen call is made in a way it's blocking because it's a command line app. Ah, curious thing, my command line app has a graphical version that is also built with pyinstaller but it's apparently not affected by the issue! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
It is stored in If your application does not have any delayed module imports, you could probably also just call |
Beta Was this translation helpful? Give feedback.
It is stored in
sys._MEIPASS
.If your application does not have any delayed module imports, you could probably also just call
SetDllDirectory(NULL)
once, after importing all the modules that your application uses (i.e., you might get away withotu restoring it back).