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

Global Installation Warning #11752

Open
1 task done
sujaldev opened this issue Jan 27, 2023 · 0 comments · May be fixed by #11753
Open
1 task done

Global Installation Warning #11752

sujaldev opened this issue Jan 27, 2023 · 0 comments · May be fixed by #11753
Labels
S: needs triage Issues/PRs that need to be triaged type: feature request Request for a new feature

Comments

@sujaldev
Copy link

sujaldev commented Jan 27, 2023

What's the problem this feature will solve?

Often times I (and I presume many other people) forget to activate a virtual environment and accidentally install globally, flooding the bin folder with a lot of unnecessary files, which becomes annoying for tab to autocomplete. And there exist many other reasons to not install globally, depending on what you're doing.

Describe the solution you'd like

This could be a opt-in/opt-out feature, depending on what the consensus is, through the configuration file maybe?

$ pip install -r requirements.txt
WARNING: Installing globally! Proceed (y/N)? 

$ pip config set install.global-install-warning false
$ pip install -r requirements.txt
...

$ pip config set install.global-install-warning true
$ pip install -r requirements.txt
WARNING: Installing globally! Proceed (y/N)? 

Alternative Solutions

pip config set install.require-virtualenv true does more or less what I want but I think if there existed another option that does not just raise an error rather gives a warning and asks whether or not to proceed, that would be much more convenient.

Additional context

This might be helpful.

Code of Conduct

@sujaldev sujaldev added S: needs triage Issues/PRs that need to be triaged type: feature request Request for a new feature labels Jan 27, 2023
@sujaldev sujaldev linked a pull request Jan 27, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S: needs triage Issues/PRs that need to be triaged type: feature request Request for a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant