git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to force "python -m site" ENABLE_USER_SITE to false?


Any suggestions on how one can force the "python -m site" ENABLE_USER_SITE value to false?

Is it possible to globally force this setting - across all users - when installing a system wide version of Python ... or via a command line option when starting a Python session?

Motivation: When ENABLE_USER_SITE is true, packages can get accidentally installed in user specific Python\Python3XX\site-packages folder, overriding system packages and ... apparently (at least under Windows) ... virtual environment packages as well.

Thank you,
Malcolm