No such file or directory: '/usr/local/bin/pip'
Question:
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.
Answers:
I solved it by removing the pip file in /usr/local/bin
and reinstalling pip.
Just run:
$ hash -r
in bash and it will be solved.
My solution to the "No such file or directory" error was to add to $PATH the directory, where the ‘pip’ (and ‘pip3’) commands are installed. In your case such directory might be ‘/usr/local/bin/pip’.
In my case, I had to upgrade pip from 22.1.2 to 22.2.1:
pip3 install --upgrade pip
Find your pip binary using this:
which pip or which pip3.7
then copy to below path:
sudo cp /home/LOGGED_USER/.local/bin/pip3.7 /usr/bin/pip3.7
In my case I was using python3 pip
but the working command was pip3
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.
I solved it by removing the pip file in /usr/local/bin
and reinstalling pip.
Just run:
$ hash -r
in bash and it will be solved.
My solution to the "No such file or directory" error was to add to $PATH the directory, where the ‘pip’ (and ‘pip3’) commands are installed. In your case such directory might be ‘/usr/local/bin/pip’.
In my case, I had to upgrade pip from 22.1.2 to 22.2.1:
pip3 install --upgrade pip
Find your pip binary using this:
which pip or which pip3.7
then copy to below path:
sudo cp /home/LOGGED_USER/.local/bin/pip3.7 /usr/bin/pip3.7
In my case I was using python3 pip
but the working command was pip3