Reset to default
Trending sort is based off of the default sorting method — by highest score — but it boosts votes that have happened recently, helping to surface more up-to-date answers.
It falls back to sorting by highest score if no posts are trending.
The first thing you should try is:
sudo pip uninstall pip
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 my case I ran the following command and it worked (not that I was expecting it to):
sudo pip uninstall pip
Which resulted in:
Uninstalling pip-6.1.1: /Library/Python/2.7/site-packages/pip-6.1.1.dist-info/DESCRIPTION.rst /Library/Python/2.7/site-packages/pip-6.1.1.dist-info/METADATA /Library/Python/2.7/site-packages/pip-6.1.1.dist-info/RECORD <and all the other stuff> ... /usr/local/bin/pip /usr/local/bin/pip2 /usr/local/bin/pip2.7 Proceed (y/n)? y Successfully uninstalled pip-6.1.1
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:
cd /Library/Frameworks/Python.framework/Versions/Current/bin/ cd /Library/Frameworks/Python.framework/Versions/3.3/bin/
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 what
2>/dev/null does). This is my output:
$ find / -name pip 2>/dev/null /Library/Frameworks/Python.framework/Versions/2.7/bin/pip /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip /Library/Frameworks/Python.framework/Versions/3.3/bin/pip /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/pip /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pip /Library/Frameworks/Python.framework/Versions/7.1/bin/pip /Library/Frameworks/Python.framework/Versions/7.1/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip
Aditionally to the answer from @srk, you should uninstall package
python -m pip uninstall pip 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
setuptools too early. E.g.
pip freeze | grep -v "^-e" | grep -v "^(setuptools|pip)" | xargs pip uninstall -y
On macOS Big Sur Version 11.0.1
$ which pip output: /usr/local/bin/pip
$ cd /usr/local/bin
There I found pip, pip2, pip2.7
$ sudo rm -r pip # for each version to remove
Somehow the installation with easy_install was corrupted.
Since pip is a package,
pip uninstall pip
Will do it.
EDIT: If that does not work, try
sudo -H pip uninstall pip.
First see the path of the python site-packages files by running this python code
import os import inspect print(os.path.dirname(inspect.getfile(inspect))+"/site-packages")
a path will be printed, take it and add it as a parameter to your pip command
pip install package_name -t "the printed path"
pip install pandas -t "the printed path"