+3 votes
in Programming Languages by (75.1k 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

+1 vote
by (353k points)
selected by
Best answer

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