14

I had pip installed earlier on my OSX, but its not working somehow. So, i was trying to install pip again, using the command :

sudo easy_install pip

But it gives me the error as below :

pip 9.0.1 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'

I am neither able to use pip, nor install it.

Sarang Manjrekar
  • 1,449
  • 3
  • 25
  • 57

2 Answers2

44

Just run:
$ hash -r
in bash and it will be solved.

mx0
  • 5,600
  • 10
  • 45
  • 51
Ebin Joseph
  • 456
  • 5
  • 2
  • THANK YOU THIS WORKED FOR ME March 2020 – lizziepika Mar 20 '20 at 21:32
  • There's no man page for this command, but it does work in some cases -- it updates the bash path hash, which sometimes gets stale under pyenv. https://www.computerhope.com/unix/bash/hash.htm – Autumn Jul 23 '21 at 23:07
8

I've got in the same situation

what I do is remove pip file in /usr/local/bin and reinstall pip

it worked!!