build
build copied to clipboard
Packages can't be installed in isolated env if pip is in `user' mode
If a user has configured pip to run in user
mode, it will be unable to install packages in build
's isolated environment. See: https://github.com/pypa/packaging-problems/issues/459#issuecomment-786992480.
How do we override that?
I suppose we could set PIP_USER
to 0
or pass --no-user
to every pip command that we issue, if this is something that we want to handle in build
.
Is --no-user
a supported flag? https://github.com/pypa/pip/issues/8977#issuecomment-706535089
build is not an "end user" in this context.
Just to make sure you have noticed the close reason, https://github.com/pypa/pip/issues/8977#issuecomment-706483689 :
pip has real config in a virtual environment, at
$(sys.prefix)/pip.conf
. Having auser = false
there would override the user configuration.
It seems like it should be set on venv
or virtualenv
side, since no one would like to do a real pip install
in virtual envrionment? Or is it better to be set by every module that creates virtual envrionment and wants to install modules inside? What do you think?
It’d be pretty weird for the built-in venv
to create a tool-specific config file; I’m more inclined to think pip and/or tools using virtual environments should fix this on its own.
Regarding pip, the logic around scheme selection really needs an complete redesign IMO (see discussion in pypa/pip#7829), and --user
is only one sympton to the problem. But it has a lot of combinations and needs someone to sit down for a long time and work out all of the possibilities, which is unsurprisingly not a very popular task.