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
Upgrade your setuptools:
wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python3
Generally sudo combined with pip is considered harmful, avoid this when your system is not already broken.
The only solution I could find is reinstalling pip
. Run these commands on your terminal
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
!
Please refer to https://stackoverflow.com/a/48126778/7596504. The problem could be fixed by modifying your /usr/local/lib/python3.5/dist-packages/pip/_vendor/pkg_resources/__init__.py
.