You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The way that the python environment is set up for scripts/entrypoints (by modifying sys.path with site.addsitedir) is not inherited with multiprocessing (when spawn is used)
#1793
Open
colonelpanic8 opened this issue
Sep 4, 2024
· 1 comment
The way that the python environment is set up for scripts/entrypoints (by modifying sys.path with site.addsitedir) is not inherited with multiprocessing (when spawn is used)
Basically, because the modification to sys.path only happen within the process, it does not seem that the child process properly inherits all of those modifications.
Looking in to a bit more, it may be that this is actually more of a nixpkgs issue than anything else, because this happens here:
The way that the python environment is set up for scripts/entrypoints (by modifying sys.path with site.addsitedir) is not inherited with multiprocessing (when spawn is used)
Basically, because the modification to sys.path only happen within the process, it does not seem that the child process properly inherits all of those modifications.
Looking in to a bit more, it may be that this is actually more of a nixpkgs issue than anything else, because this happens here:
https://github.com/NixOS/nixpkgs/blob/bd346e9f29610cbedaa56104174ff1e656efe521/pkgs/development/interpreters/python/wrap-python.nix#L39
but I do basically think that we need to properly wrap the binary or set something in the environment so that this works properly.
The text was updated successfully, but these errors were encountered: