This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Jonathon Reinhart
Recipients Denis.Barmenkov, Jonathon Reinhart, aikinci, arekm, bbi5291, christian.heimes, eric.araujo, georg.brandl, grahamd, loewis, nadeem.vawda, ned.deily, neologix, serhiy.storchaka, tarek, vstinner, xuanji, zaytsev
Date 2016-01-05.03:10:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1451963455.9.0.281825166783.issue10496@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2016-01-05 03:10:56Jonathon Reinhartsetrecipients: + Jonathon Reinhart, loewis, georg.brandl, arekm, vstinner, christian.heimes, nadeem.vawda, tarek, ned.deily, eric.araujo, grahamd, neologix, xuanji, bbi5291, Denis.Barmenkov, aikinci, serhiy.storchaka, zaytsev
2016-01-05 03:10:55Jonathon Reinhartsetmessageid: <1451963455.9.0.281825166783.issue10496@psf.upfronthosting.co.za>
2016-01-05 03:10:55Jonathon Reinhartlinkissue10496 messages
2016-01-05 03:10:54Jonathon Reinhartcreate