Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Uninstall setuptools python

Tags:

python

ubuntu

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

like image 753
Gayan Kalanamith Avatar asked Jan 24 '12 05:01

Gayan Kalanamith


People also ask

How do I install Python setuptools?

Follow the below steps to install the Setuptools package on Linux using the setup.py file: Step 1: Download the latest source package of Setuptools for Python3 from the website. Step 3: Go to the setuptools-60.5. 0 folder and enter the following command to install the package.

Is setuptools installed by default with Python?

Usually, Yes. the setuptools is not part of the python vanilla codebase, hence not a vanilla modules. python.org installers or mac homebrew will install it for you, but if someone compile the python by himself or install it on some linux distribution he may not get it and will need to install it by himself.


3 Answers

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.
like image 42
Paulo Scardine Avatar answered Oct 07 '22 11:10

Paulo Scardine


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
like image 114
retsigam Avatar answered Oct 07 '22 11:10

retsigam


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.)

like image 45
sblom Avatar answered Oct 07 '22 09:10

sblom