+2 votes
in Programming Languages by (17.0k points)

When I try to install any Python package using pip, it gives the following error: sudo: pip: command not found

I tried to install using sudo apt-get install pip, but i says: Unable to locate package pip
How to install pip?

1 Answer

0 votes
by (29.1k points)
edited by

You have to install python-pip instead of pip. Try the following command and it should work fine.


sudo apt-get install python-pip


sudo apt-get install python3-pip