Skip to content

Prevent pip installs that start with pip install pip install #11484

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

Closed
1 task done
MaddyGuthridge opened this issue Oct 4, 2022 · 6 comments
Closed
1 task done

Prevent pip installs that start with pip install pip install #11484

MaddyGuthridge opened this issue Oct 4, 2022 · 6 comments
Labels
type: feature request Request for a new feature

Comments

@MaddyGuthridge
Copy link

What's the problem this feature will solve?

When copying install commands, it is very easy to accidentally copy a command that already has pip install, meaning that pip will attempt to install pip and install. This isn't a massive issue since it's easy enough to pip uninstall install soon afterwards, but it's still a bit of a nuisance.

Describe the solution you'd like

If a command starts with pip install pip install, an error should be printed instead of proceeding with the action. Perhaps for the one-in-a-million case where it's intentional, we can prompt the user with an "If this was intentional, please run pip install install pip instead".

Alternative Solutions

I can't think of any - I think this is a pretty small quality of life improvement.

Additional context

$ pip install pip install python-dotenv
Requirement already satisfied: pip in ./.venv/lib/python3.10/site-packages (22.2.2)
Collecting install
  Using cached install-1.3.5-py3-none-any.whl (3.2 kB)
Collecting python-dotenv
  Downloading python_dotenv-0.21.0-py3-none-any.whl (18 kB)
Installing collected packages: python-dotenv, install
Successfully installed install-1.3.5 python-dotenv-0.21.0

Code of Conduct

@MaddyGuthridge MaddyGuthridge added S: needs triage Issues/PRs that need to be triaged type: feature request Request for a new feature labels Oct 4, 2022
@pradyunsg
Copy link
Member

pypi/support#451

@MaddyGuthridge
Copy link
Author

@pradyunsg to clarify I'm not suggesting that the install package be delisted - this is specifically a fix to address when people run pip install pip insatall ...

@pfmoore
Copy link
Member

pfmoore commented Oct 4, 2022

I don't think this is a common enough mistake to justify a special case error for it.

@MaddyGuthridge
Copy link
Author

I've made it 3 times in the last week or so

@pradyunsg
Copy link
Member

pradyunsg commented Oct 4, 2022

If you believe what I believe, that no one intentionally installs install, it’s quite a few people — ~30k downloads daily: https://pypistats.org/packages/install

@pradyunsg pradyunsg removed the S: needs triage Issues/PRs that need to be triaged label Oct 5, 2022
@pradyunsg
Copy link
Member

pypi/support#451 has been closed since the problematic package has been removed.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature request Request for a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants