1
votes

after install python-pip using "$ sudo apt-get install python-pip"

when i check version "$ pip -V"

showing error "bash: /usr/local/bin/pip: No such file or directory "

can anyone help please???

thanks.

2
Can you try "$ python -V" and show me the output? - Philip Tzou
"Python 2.7.12" - Tanmoy Ghosh
How about "$which -a pip" - Philip Tzou
output is "/usr/bin/pip" - Tanmoy Ghosh
Just in case... What's the output for ls -la /usr/bin/pip? - Philip Tzou

2 Answers

2
votes

Update:

sudo rm /usr/local/bin/pip

It could be one of the following cases or just a broken symlink.


My guess: /usr/local/bin/pip is probably using Python 3 which is not installed on your system (assuming Ubuntu or Debian). This can be verified by checking the first line of the file:

head /usr/local/bin/pip

If it shows something like #!/usr/bin/python3, and Python 3 is not installed, it could cause the error "No such file or directory".

I asked you to run "which -a pip" is also another way to check this. Since apt only installs pip in /usr/bin but not /usr/local/bin, it probably that you never called the pip command installed through apt.

However, I can not tell if it's the case until you tried these commands. After that thing becomes really simple: just delete /usr/local/bin/pip will fix the problem.

-1
votes

You need to install python-pip from the segment in which python scripts exist.

In my case, you can see in this image: enter image description here

At the title bar press cmd and hit Enter. Command prompt will open at this directory. I am sure your pip is not in Scripts directory, thats why you are facing the same issue I faced some days before.

Try execute the commands : $ sudo apt-get install python-pip Or you can install the updated version pip3

Hope it will work.