Author bernd.wechner
Recipients bernd.wechner
Date 2020-10-10.07:24:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
When developing Python software it is highly discouraged to install python modules globally (risking adverse impacts upon the underlying OS where if has Python dependencies).

Project by project this typically done with venvs (and the venv module)

User by user it is typically done with the --user option.

In fact to make impacting system libraries less likely a pip.conf file can be written that contains:

user = true

I suspect this is an increasingly common practice which means pip installs are on a local user profile not into system dirs. 

Alas when in a venv now, pip bombs with a detected conflict:

ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.

This was explored with pip here:

It turns out that pip can be made to function by overriding this setting in the venv. That is depositing a pip.conf in the vend dir that contains:

user = true

and all is good once more. In the activated venv pip now works again. 

This is at its core a coordination issue then between the venv module and pip and the point to fix it seems most likely to be in the venv module which, knowing that this conflict can exist can as a safety precaution simply always, or optionally, write a pip.conf into newly created venvs that disables the user options. Given pip won't work in a venv if that option is enabled and we know that up front.

Why fix it in the venv module? Because discovering the cause of this conflict was time consuming and disorienting, poor UX by any definition and it should ideally not arise or if it must have an easily discovered fix. 

This is a request to prevent it arising altogether in newly created venvs.
Date User Action Args
2020-10-10 07:24:45bernd.wechnersetrecipients: + bernd.wechner
2020-10-10 07:24:45bernd.wechnersetmessageid: <>
2020-10-10 07:24:45bernd.wechnerlinkissue41990 messages
2020-10-10 07:24:44bernd.wechnercreate