-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Command - pip reset #12694
Comments
Deleting and recreating a virtual environment is, by design, a fast operation. The proposed pip subcommand would merely be a slower way of doing the same thing. Thanks for the suggestion but I don’t think it’s something we would want to spend our limited bandwidth on. |
https://github.com/pradyunsg/dotfiles/blob/main/src/python/.zsh/8-v.symlink.zsh#L111 This is something that could be done externally to pip today, like I have in the link above. @pfmoore while I agree with your assessment here, I will say that this issue represents a desire for a lower-effort way of doing things. Specifically, that recreating a virtual environment requires knowing/typing the path or some substitute and it's often nice to not have to think about details like that. |
Its more of a way to revert the base environment, which is generally used by default |
When you say the “base environment”, do you mean the system Python, i.e. not a virtual environment? If so, then generally the advice is not to install packages direct into the base environment - in many cases, you should be managing that environment using a system package manager rather than pip anyway. But if you do need to do that, a script such as the one @pradyunsg linked to, is probably the best way. |
Yes, the script helps. |
I think one thing to note is deleting all (pip-)installed packages does not equal to blanking the environment, especially if the environment is shared (not isolated to one specific use case). If the environment is a virtual environment, a script wiping |
What's the problem this feature will solve?
Problem:
Once packages are installed, there is not way to come to the starting point in base environement except creating a new virtual env
Solution:
pip reset
command would uninstall all the libraries which are not installed as a base package.Describe the solution you'd like
A
pip reset
commnandAlternative Solutions
pip uninstall command can be more powerfull
Additional context
Requires creating venv in case the base python has a lots of packages and is not maintained well
Code of Conduct
The text was updated successfully, but these errors were encountered: