change --user behaviour in a virtualenv
See original GitHub issueWhat’s the problem this feature will solve?
subprocess call to pip with with --user
in virtualenv currently throw an error
Describe the solution you’d like
Replace the InstallationError
triggered by virtualenv_no_global()
with a debug message like
in other cases
Alternative Solutions workaround is by construct pip3 install call dynamically
from pip._internal.utils.virtualenv import virtualenv_no_global
arg = '' if virtualenv_no_global() else '--user'
Additional context https://github.com/pypa/pip/blob/520e76ddb950e05c1b6e50b1108196c79c5e856f/src/pip/_internal/commands/install.py#L577
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Altering User Movement Behaviour in Virtual Environments
In this work, we investigated how user behaviour is affected when the Virtual Environment differs from the physical space. We created two sets...
Read more >Pip default behavior conflicts with virtualenv? - Stack Overflow
It seems like pip defaults to --user installations though, can I change this default behavior?
Read more >User Guide — virtualenv 20.17.2.dev2+g6845f6f documentation
The command line tool has quite a few of flags that modify the tool's behaviour, for a full list make sure to check...
Read more >The Heat is On: Exploring User Behaviour in a Multisensory ...
The Heat is On: Exploring User Behaviour in a Multisensory Virtual Environment for Fire Evacuation. Authors:Emily Shaw, Tessa Roper, Tommy ...
Read more >Installing packages using pip and virtual environments
When you switch projects, you can simply create a new virtual environment and not have to worry about breaking the packages installed in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
doing that would create a situation where a script error would silently install packages in a virtualenv instead of a user-site, as far as i can tell that would be absolutely unacceptable
I’m gonna go ahead and close this out – this error is intentional, explicitly mentioned in the PEP/by the PEP author and designed to avoid modifying the global/user environment when running within a virtual environment.
Any discussion about changes to how the user site-packages are handled should take place on python-dev or discuss.python.org, not this issue tracker.
Any configuration handling related changes can use #7902 for discussion.