Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you uninstall the package manager "pip", if installed from source?

I was unaware that pip could be installed via my operating system's package manager, so I compiled and installed pip via source with the following command:

wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | sudo python

I would like to uninstall pip, and instead install it from my operating system's package manager. How would I go about completely undoing the work of the installation script?

like image 327
D.C. Rockwell Avatar asked Sep 01 '25 22:09

D.C. Rockwell


2 Answers

pip uninstall pip will work  

like image 183
Karthikeyan D Avatar answered Sep 03 '25 10:09

Karthikeyan D


That way you haven't installed pip, you installed just the easy_install i.e. setuptools.

First you should remove all the packages you installed with easy_install using (see uninstall):

easy_install -m PackageName

This includes pip if you installed it using easy_install pip.

After this you remove the setuptools following the instructions from here:

If setuptools package is found in your global site-packages directory, you may safely remove the following file/directory:

setuptools-*.egg

If setuptools is installed in some other location such as the user site directory (eg: ~/.local, ~/Library/Python or %APPDATA%), then you may safely remove the following files:

pkg_resources.py
easy_install.py
setuptools/
setuptools-*.egg-info/
like image 22
Viktor Kerkez Avatar answered Sep 03 '25 12:09

Viktor Kerkez