Reputation: 2385
After upgrading your Ubuntu 16.04 LTS to the latest Ubuntu 18.04 LTS, while using pip
or pip3
facing this issue:
pkg_resources.DistributionNotFound: The 'pip==10.0.1' distribution was not found and is required by the application
Upvotes: 3
Views: 2021
Reputation: 1
sudo apt-get purge python-pip
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
pip --version
rm get-pip.py
Above shell command works for me! For details, please refer to: https://stackoverflow.com/a/45887255/8596899
Upvotes: 0
Reputation: 2385
What seems to solve the problem.
Firstly, removing pip
from the computer by sudo apt-get purge python-pip
and then again reinstalling it by apt-get install python-pip python-dev build-essential
or just sudo apt-get install python-pip
wont fix the error. Because pip-9.0.1
is being installed by default.
Actual solution
Installing using curl helped,
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
and then python get-pip.py
for python 2 and python3 get-pip.py
for python 3.
Upvotes: 2