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. (https://github.com/invl/pip-autoremove/issues/5)
What is recommendation from pip itself here?
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
This seems to be a valid request. I'll look into it soon. :)
@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.
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).
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.
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.
Most helpful comment
@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.