python -m pip uninstall pip setuptools
Thank you
This may also be handy if coming here looking to uninstall pip and all packages installed by pip
Goes without saying that you should run the commands in the above link before running the command in this issue.
pip uninstall pip
And if is pip is broken? Can I remove some folders and reinstall it?
How is it broken ? python -m pip.__main__
does not work ?
You could download https://bootstrap.pypa.io/get-pip.py
and run python get-pip.py --ignore-installed
to reinstall pip.
No, nothing work. The only way was delete the /usr/lib/python2.7/site-packages
folder, and then try python get-pip.py
again. But in my case I am installing all packages again. Thanks for the tip! Next time I try it before run rm -rf
stuff... this time was too late, hhehehehe
@jonathanpmartins Yeah,site-package removal method worked for me too.my pip was broken somehow and get-pip kept saying that pip is already installed instead of doing a fresh installation,Only when the folder was removed the get-pip allowed to reinstall the pip from scratch. This method works when I can't go for 'pip uninstall pip' since pip was said to be installed by get-pip.py but broke,so how could I use pip to uninstall pip.
This was the only option I was left with.
Most helpful comment
python -m pip uninstall pip setuptools