I ran the following commands:
easy_install pip
sudo pip install setuptools --no-use-wheel --upgrade
How do I reverse the two commands to get my python back to its original state in OSX? (removing pip as part of it)
I ran the following commands:
easy_install pip
sudo pip install setuptools --no-use-wheel --upgrade
How do I reverse the two commands to get my python back to its original state in OSX? (removing pip as part of it)
Delete all the pip related files from /usr/local/bin. It does the magic.
In my case I ran the following command and it worked (not that I was expecting it to):
Which resulted in:
Aditionally to the answer from @srk, you should uninstall package
setuptools
:If you want to uninstall all other packages first, this answer has some hints: https://stackoverflow.com/a/11250821/265954
Note: before you use the commands from that answer, please carefully read the comments about side effects and how to avoid uninstalling
pip
andsetuptools
too early. E.g.pip freeze | grep -v "^-e" | grep -v "^(setuptools|pip)" | xargs pip uninstall -y
The first thing you should try is:
On many environments that doesn't work. So given the lack of info on that problem, I ended up removing pip manually from /usr/local/bin.
In order to completely remove pip, I believe you have to delete its files from all Python versions on your computer. For me, they are here:
You may need to remove the files or the directories located at these file-paths (and more, depending on the number of versions of Python you have installed).
Edit: to find all versions of pip on your machine, use:
find / -name pip 2>/dev/null
, which starts at its highest level (hence the/
) and hides all error messages (that's what2>/dev/null
does). This is my output: