I have Ubuntu20 and by default if I check pip version I get it is for python2

ashu@dev:~$ pip --version
pip 20.3.4 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)

But I want to use pip for pyhon3 and if I check pip3 I get following:

$ pip3 --version
Command 'pip3' not found, but can be installed with:
sudo apt install python3-pip

Therefore I executed above command to have pip3 for python3 at my system :

sudo apt install python3-pip

It displays a bit general information and asks for password and later confirmation which I moved ahead with and at the end when I executed version check I got :

pip3 --version
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)

Leave a Reply

Your email address will not be published. Required fields are marked *