Skip to content

Commit 812c016

Browse files
gletortctrueden
authored andcommitted
Do not pass PYTHONEXECUTABLE to worker, either
The PYTHONEXECUTABLE variable propagating to the worker process causes the wrong (service) Python to be used, rather than the desired one from the environment. Signed-off-by: Curtis Rueden <ctrueden@wisc.edu>
1 parent 0dfc8bd commit 812c016

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/appose/environment.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,12 @@ def python(self, *args) -> Service:
149149
# NB: Unset conda/mamba variables so they don't bleed into the worker
150150
# process and cause the wrong Python interpreter to be resolved.
151151
# Only clear variables not explicitly set by the caller via env().
152-
conda_vars = ("CONDA_PREFIX", "CONDA_DEFAULT_ENV", "CONDA_SHLVL")
152+
conda_vars = (
153+
"CONDA_PREFIX",
154+
"CONDA_DEFAULT_ENV",
155+
"CONDA_SHLVL",
156+
"PYTHONEXECUTABLE",
157+
)
153158
explicit = self.env_vars()
154159
conda_unset = {var: None for var in conda_vars if var not in explicit}
155160
return (

0 commit comments

Comments
 (0)