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

Provide a --target option on uninstall (to undo install with --target) #5595

Open
ronpandolfi opened this issue Jul 11, 2018 · 5 comments
Open
Labels
C: target pip install's --target option's behaviour handling state: needs discussion This needs some more discussion type: feature request Request for a new feature

Comments

@ronpandolfi
Copy link

ronpandolfi commented Jul 11, 2018

What's the problem this feature will solve?
Currently, there is no clear way to uninstall a package that has been installed to a directory outside sys.prefix using pip install --target. Attempting to do so via modifying sys.path results in "Not uninstalling X at Y, outside environment Z"

Describe the solution you'd like
Mirror the functionality of pip install --target to pip uninstall --target

This would enable installing/uninstalling packages to sandboxed directories (similarto a venv, but without the extra baggage), as --target seems to be intended.

Alternative Solutions
While a venv could provide an alternative solution, it is still an issue that there is no 'undo' for the situation where --target is used.

@pradyunsg pradyunsg added type: feature request Request for a new feature C: target pip install's --target option's behaviour handling S: needs triage Issues/PRs that need to be triaged labels Jul 20, 2018
@chrahunt chrahunt added the state: needs discussion This needs some more discussion label Aug 31, 2019
@triage-new-issues triage-new-issues bot removed the S: needs triage Issues/PRs that need to be triaged label Aug 31, 2019
@chrahunt
Copy link
Member

Related to #4575.

@xeacott
Copy link

xeacott commented May 8, 2020

Is this specific feature going to be added?

@pfmoore
Copy link
Member

pfmoore commented May 9, 2020

As the label says, discussion is needed (and the linked issue gives some background). So not immediately is probably the best answer - we will quite probably implement something addressing the more general need at some point, though.

@GitHunter0
Copy link

It is an important matter. Is there an workaround for that?

@ccx1997
Copy link

ccx1997 commented Dec 27, 2023

I finally got it by adding python -m.

conda activate env_path
python -m pip uninstall <package_name>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: target pip install's --target option's behaviour handling state: needs discussion This needs some more discussion type: feature request Request for a new feature
Projects
None yet
Development

No branches or pull requests

7 participants