Running a command alongwith pip gives the following error. Even the command pip -V produces the following error. I read that the error is due to setuptoo
pip -V
The only solution I could find is reinstalling pip. Run these commands on your terminal
pip
wget https://bootstrap.pypa.io/get-pip.py
sudo -H python get-pip.py --prefix=/usr/local/
However, this works only for pip, not pip3!
pip3