Jonathon Reinhart added the comment:

I have another scenario where this happens: Running Python in a Docker 
container, passing the --user option to 'docker run'. This sets the UID in the 
container, which has its own /etc/passwd. Couple this with the fact that $HOME 
might not be set (e.g. when Python is invoked from SCons which deliberately 
clears the environment for sub-processes), and *boom*, Python is non-functional.

Regardless of where the fix is done, the ideal behavior is straightforward: if 
Python can't determine the home directory, don't try to add user site packages.

This bug is now over 5 years old, and people have identified real-life various 
scenarios where this bug manifests itself, and submitted patches. Could we 
please address this?

----------
nosy: +Jonathon Reinhart

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10496>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to