9

Hi recently i installed setup tools module and google app engine gives me errors . Is there a way to uninstall setuptool? can any one tell me step by step because i tried hard

1
  • What is the error from app engine?
    – Jayesh
    Jan 24, 2012 at 6:36

4 Answers 4

13

The answer depends on how it was installed.

If it was installed using the ubuntu (debian) package manager, try:

sudo apt-get remove --purge python-setuptools

[updated]

If you installed manually, probably the setuptools final location will be something like (adjust for your environment/python version):

/usr/local/lib/python2.6/dist-packages

Just delete the setuptools stuff there.

Lame, I know, but it is your burden for not using the excellent package manager provided by ubuntu: stick to dpkg unless you need bleeding edge stuff. For other python modules installed by setuptools, it provides no "uninstall" feature (but pip does, that is why there is a lot of enthusiasm around virtualenv, pip and yolk).

[2017 update]

It is 2017 and installing Python modules changed a bit:

  • pip is now the preferred installer program. Starting with Python 3.4, it is included by default with the Python binary installers.
  • venv is the standard tool for creating virtual environments (semi-isolated Python environments that allow packages to be installed for use by a particular application, rather than being installed system wide), and has been part of Python since Python 3.3. Starting with Python 3.4, it defaults to installing pip into all created virtual environments.
  • virtualenv is a third party alternative (and predecessor) to venv and if not official it is still very popular because it allows virtual environments to be used on versions of Python prior to 3.4, which either don’t provide venv at all, or aren’t able to automatically install pip into created environments.
0
12
easy_install pip
pip uninstall pip setuptools

(pip and setuptools both use the same package formats, but pip has uninstall support. kinda hilarious that installing something is the easiest way to uninstall.)

4
  • pip requires setuptools as a requirement.
    – lprsd
    Jan 24, 2012 at 5:43
  • 2
    I just got pip uninstall pip setuptools to get rid of both before disappearing never to be heard from again.
    – sblom
    Jan 24, 2012 at 6:06
  • 3
    @sblom Are you not gonna miss pip? :(
    – 0xc0de
    Jan 24, 2012 at 10:37
  • I love pip. But apparently the OP does not.
    – sblom
    Jan 24, 2012 at 15:46
2

I was having trouble with the method below because my pip wasn't up to date.

easy_install pip
pip uninstall pip setuptools

After upgrading pip like this:

sudo -H pip install --upgrade pip

I was able to successfully uninstall setuptools like so:

pip uninstall setuptools
0

adding this as I encountered problems with removing setuptools in a UBI (Redhat) docker image as setuptools is extensively used by dnf.

Therefore we had to use rpm to remove

rpm -e  --nodeps platform-python-setuptools

Please bear in mind that this might break the dnf/yum as they are dependent on them. We had to take this step as we had a docker image which was reported to vulnerable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.