I got the same error. I did this and it worked!
sudo apt-get install --reinstall python2.7
This to reinstall python. Don’t ever try to uninstall python ,it will crash your OS as part of Ubuntu is dependent on python.Then,
sudo apt-get purge python-pip
This is to remove pip.
sudo python get-pip.py
Then,you can install packages using pip like
sudo pip install package-name