-1

Possible Duplicate:
How do I remove packages installed with Python's easy_install?

I am asking the same question as this. That did not help. How can I remove installed python modules like tidylib, beautifulsoup, etc...?

I have tried this:

pip uninstall tidylib

I get this error:

pip: error: No command by the name pip uninstall

I tried pip install -U pip, it upgrades pip, but the same error

Community
  • 1
  • 1
torayeff
  • 9,296
  • 19
  • 69
  • 103
  • 2
    In the question that you asked, the accepted answer was perfectly legitimate. http://stackoverflow.com/a/3297564/251174 – swasheck Jun 13 '12 at 15:55
  • 1
    Welcome to python hell (the rest is heaven) – KurzedMetal Jun 13 '12 at 15:56
  • @KurzedMetal Python actually has very good package management. – Marcin Jun 13 '12 at 15:57
  • 1
    The real answer here is use your distro's package manager - that way it's easy to install and remove. `pip` does the job if your distro doesn't, but why move away from the system you use for everything else? – Gareth Latty Jun 13 '12 at 15:57
  • pip: error: No command by the name pip uninstall – torayeff Jun 13 '12 at 15:58
  • @Lattyware By default I have python2.6 on Ubuntu 10.04, then I installed python2.7 from source, now I have problems with python modules – torayeff Jun 13 '12 at 15:59
  • @Marcin Yeah, sure, that's why we have setuptools, distribute, distribute2, pip, virtualenv, and none satisfy most users (except maybe for the latter two). IMO, the packaging system could be a lot better. EDIT: Actually packaging is good, distribution and maintenance is bad. – KurzedMetal Jun 13 '12 at 15:59
  • 1
    @torayeff So, you don't actually have pip, and you wonder why you can't use it? – Marcin Jun 13 '12 at 15:59
  • @Marcin pip install works but not pip uninstall – torayeff Jun 13 '12 at 16:01
  • 1
    `pip -U pip` to get the latest version – swasheck Jun 13 '12 at 16:02
  • @torayeff what does "does not work" mean? could you update your question? – niko Jun 13 '12 at 16:03
  • 1
    @torayeff you're probably running into a version issue. I'm guessing that you have pip installed on a version (2.7, maybe?) but you're thinking of modules that are installed on 2.6. So what I'm guessing is that your error is something along the lines of "there is no python module named ..." because that module is not installed in the same python version as pip. – swasheck Jun 13 '12 at 16:06

1 Answers1

1

Not only should you be using pip (you'll need to install it), you should also be using virtualenv (you'll need to install that too), to create isolated environments which can have different package configurations.

The only things that should go in your global environment are tools like those, and if necessary, packages that refuse to be installed any other way.

Marcin
  • 48,559
  • 18
  • 128
  • 201