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

how to uninstall pip-installed package with all its dependencies? #2635

Closed
bialix opened this issue Apr 6, 2015 · 6 comments
Closed

how to uninstall pip-installed package with all its dependencies? #2635

bialix opened this issue Apr 6, 2015 · 6 comments
Labels
auto-locked Outdated issues that have been locked by automation C: dependency resolution About choosing which dependencies to install type: enhancement Improvements to functionality

Comments

@bialix
Copy link

bialix commented Apr 6, 2015

I've installed Sphinx via pip, it's installed 11 more packages, probably it's dependencies of Sphinx.
Now I want to uninstall all this mess.
I see --requirement <file> option in the help to uninstall, but I have no clue where I should find this file for Sphinx. I simply executed pip install Sphinx.
Can I have something like pip uninstall --with-all-dependencies Sphinx?

I found separate library https://github.com/invl/pip-autoremove which promised to do what I need but unfortunately it did not, maybe it's not very Windows-compatible. (invl/pip-autoremove#5)

What is recommendation from pip itself here?

@bialix bialix changed the title how to uninstall pip-installed packge with all its dependencies? how to uninstall pip-installed package with all its dependencies? Apr 6, 2015
@nickzuck
Copy link

Can you please give me the link from where you downloaded the Sphinx and related files. I mean id you cloned someone's repository ...Please redirect me there , that would be of the great help

@pradyunsg pradyunsg added state: needs discussion This needs some more discussion type: enhancement Improvements to functionality C: dependency resolution About choosing which dependencies to install labels Oct 2, 2017
@pradyunsg
Copy link
Member

This seems to be a valid request. I'll look into it soon. :)

@piotr-dobrogost
Copy link

piotr-dobrogost commented Oct 2, 2017

@bialix

I would suggest you stop perceiving virtualenv and pip like they would be kind of Python world's version of OS package manager. This way you can save yourself a whole world of pain. As a hint please notice that pip still does not have proper dependency resolution (issue #988) after all these years it's being used to install Python packages. This means pip does not have essential feature needed to even start talking about uninstalling something properly. If you want to be able to uninstall pip-installed package with all its dependencies you should create a new virtualenv and install a package with all its dependencies there. Then when you want to uninstall anything you remove whole virtualenv. That's how it works given current state of packaging tools in Python. Before you start crying; it's both good and bad at the same time as the world of software seems to be moving from how to modify already existing environment to our needs towards how to quickly create the same environment from scratch.

@pfmoore
Copy link
Member

pfmoore commented Oct 2, 2017

It's also worth pointing out that there's various tools appearing or gaining in popularity that build on the low-level base provided by pip/virtualenv/venv to provide a more "complete" approach to environment management. Tools like pipenv, hatch, pip-tools and pew may be worth investigating - they may not suit your particular needs, but the model of having higher-level management tools rather than loading the responsibility for handling every possible type of user requirement onto the base tools is becoming more common.

For the case of managing Sphinx, either of pew or pipenv seem like a good fit for what you want. Or if you just want to install Sphinx as a standalone tool, pipsi might be suitable (I've not used pipsi with Sphinx, so it might not be appropriate, but it is worth a look).

@bialix
Copy link
Author

bialix commented Oct 2, 2017

I think you gave valid points against my initial issue I filed more than 2 years ago.
But I'd like to point that almost all python library and tools today recommend to install them with just using "pip install XXX" and never say anything about other ways. Think about people who don't know Python eco-system well, or just afraid of using unknown tools, like virtualenv (which is not hard when you know it, but you should invest some time to known it actually). Such people just need to get their work done with help of some python tools or libraries. And then - got a mess.

Please, close this issue, I don't mind. I just want to point out about this unpleasant situation. Probably that should be addressed on other level, or other mailing list.

@bialix bialix closed this as completed Oct 2, 2017
@pfmoore
Copy link
Member

pfmoore commented Oct 2, 2017

We're in the process of updating the packaging user guide to explain the options better. That's about the best we can do, really. Unfortunately, there's not a lot we can do to get projects to update their installation instructions - and typically (and perfectly reasonably) they want a one-line suggestion, not a messy "it's complicated" explanation. And things are changing over time in this area, so there's a lot of information that ends up being out of date (we've only just got to the point where suggestions to use setup.py install and/or easy_install are fading out).

Thanks for the feedback in any case.

@pradyunsg pradyunsg removed the state: needs discussion This needs some more discussion label Oct 27, 2017
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 2, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation C: dependency resolution About choosing which dependencies to install type: enhancement Improvements to functionality
Projects
None yet
Development

No branches or pull requests

5 participants