Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packages can't be installed in isolated env if pip is in `user' mode #245

Open
layday opened this issue Feb 27, 2021 · 6 comments
Open

Packages can't be installed in isolated env if pip is in `user' mode #245

layday opened this issue Feb 27, 2021 · 6 comments

Comments

@layday
Copy link
Member

layday commented Feb 27, 2021

If a user has configured pip to run in user mode, it will be unable to install packages in build's isolated environment. See: pypa/packaging-problems#459 (comment).

@FFY00
Copy link
Member

FFY00 commented Feb 27, 2021

How do we override that?

@layday
Copy link
Member Author

layday commented Feb 27, 2021

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.

@dtrodrigues
Copy link
Contributor

Is --no-user a supported flag? pypa/pip#8977 (comment)

@layday
Copy link
Member Author

layday commented Feb 28, 2021

build is not an "end user" in this context.

@PaperStrike
Copy link

PaperStrike commented Mar 1, 2021

Just to make sure you have noticed the close reason, pypa/pip#8977 (comment) :

pip has real config in a virtual environment, at $(sys.prefix)/pip.conf. Having a user = 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?

@uranusjr
Copy link
Member

uranusjr commented Mar 6, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants