Hi, I opened
https://github.com/pantsbuild/pex/issues/785 to track an issue where user environment leaked into pex virtual environment. When pex constructs the minimum_sys_modules, it only drops tainted modules which is a package (with
path) but keeps the ones which doesn't have
path. This will leave some residual from user's environment into the pex virtual environment, for example modules like
Jinja2.utils
.
Also submitted a PR for possible fix:
https://github.com/pantsbuild/pex/pull/786/files
Please help taking a look