distutils/setuptools de-installation?

Robert Kern robert.kern at gmail.com
Mon Jun 25 21:00:08 EDT 2007


David Abrahams wrote:
> I've been googling myself silly trying to find an answer to this; my
> system's package manager is broken until I can solve it.
> 
> I installed some packages using
> 
>   python setup.py install
> 
> and I need to remove them.  For some packages,
> 
>   python setup.py develop --uninstall
> 
> is good enough, because it cleans the package out of Python's egg
> database (wherever that is),

It's just your site-packages/easy-install.pth file.

The idiomatic (but admittedly roundabout) way of doing this without having the
source is to use

  easy_install --multi-version mypackage

That accomplishes the same thing: to remove the egg from the list of active eggs
in easy-install.pth but not removing the egg itself.

> although it doesn't delete the eggs
> themselves.
> 
> For other packages, PyPgSQL among them, the above command isn't even
> recognized.  This _has_ to be a FAQ, doesn't it?  Please help!

distutils itself has no notion of uninstallation. You need to figure out what
files the package installed and delete them yourself.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco




More information about the Python-list mailing list