Ubuntu – Problem installing pip: pip command not found

command linepipsoftware installation

Having problems installing pip and not sure why can someone help me find out why the pip is returning -bash: pip: command not found?

$ echo $PATH

$ sudo easy_install pip
Searching for pip
Best match: pip 8.1.2
Processing pip-8.1.2-py2.7.egg
pip 8.1.2 is already the active version in easy-install.pth
Installing pip script to /usr/local/bin
error: [Errno 2] No such file or directory: '/usr/local/bin/pip'

Best Answer

Install pip for Python 2 by running

sudo apt install python-pip  # pip for Python 2

and for Python 3 by running

sudo apt install python3-pip  # pip for Python 3

I would discourage you from using easy_install at all if possible; to learn more, see the many great answers at https://stackoverflow.com/q/3220404/486919. Also note that the installation instructions in the official pip documentation does not mention using easy_install at all to install pip.