The answer depends on how it was installed.
If it was installed using the ubuntu package manager (debian), try:
sudo apt-get remove --purge python-setuptools
[updated]
If you installed manually, perhaps the final location of setuptools will be something like (configure for your version of the environment / python):
/usr/local/lib/python2.6/dist-packages
Just delete the setuptools file.
Lame, I know, but it’s your burden for not using the excellent ubuntu package manager: stick with dpkg if you don’t need bleeding material. For other python modules installed by setuptools, it does not provide a “delete” function (but pip , so there is a lot of enthusiasm around virtualenv , pip and yolk ).
[update 2017]
This is 2017 and the installation of Python modules has changed a bit:
- pip is now the preferred installer. Starting with Python 3.4, it is installed by default with the Python binary installers.
- venv is a standard tool for creating virtual environments (semi-isolated Python environments that allow you to install packages for use by a specific application rather than being installed on the system) and were part of Python with Python 3.3. Starting with Python 3.4, it installs the installation in all virtual environments created by default.
- virtualenv is a third-party alternative (and predecessor) for venv, and if it is not official, it is still very popular because it allows you to use virtual environments in versions of Python prior to 3.4 that either do not provide venv at all or arent able to automatically install pip to the created environment.
Paulo scardine
source share