-
-
Notifications
You must be signed in to change notification settings - Fork 16.6k
Open
Labels
0.kind: bugSomething is brokenSomething is broken6.topic: pythonPython is a high-level, general-purpose programming language.Python is a high-level, general-purpose programming language.9.needs: community feedbackThis needs feedback from more community members.This needs feedback from more community members.
Description
Related to #23639 but not quite the same.
If a python package launches python, the child's PYTHONPATH
will know nothing of the dependencies of the parent. This is almost never what you want. I think this is because rather than setting PYTHONPATH
, we use site
inside python to set the path for the current interpreter. Spawning new child interpreters won't get any of that stuff.
My current inclination would be to add a very simple line to the wrapper shim we have today:
os.environ['PYTHONPATH'] = ":".join(sys.path)
Right after we call reduce
to add all the paths. That would ensure that all children inherit the right environment. Any thoughts?
cc @FRidh
Metadata
Metadata
Assignees
Labels
0.kind: bugSomething is brokenSomething is broken6.topic: pythonPython is a high-level, general-purpose programming language.Python is a high-level, general-purpose programming language.9.needs: community feedbackThis needs feedback from more community members.This needs feedback from more community members.