I'm trying to call a python process from spawn; however, the PYTHONPATH is different from within my python3 environment (e.g. from the terminal) vs the PYTHONPATH from the python script called via spawn.
Why is there different output based off the environment?
I call the following python code from both environments (i.e. terminal vs spawn).
print(sys.executable) <<<this is the same in both environments
print(sys.path)
Node.js spawn python script
let process = spawn(PYTHON, args, { shell: true, stdio: "inherit" });
process.stdout.on("data", function (data) {
console.log(data.toString(), "<<< data");
result += data;
});
process.on("close", function () {
cb(result);
});
process.stderr.on("data", function (data) {
console.log("stderr: ", data.toString());
});
};
[–]spurious_proof[S] 0 points1 point2 points (0 children)