1

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.

5
  • Can you try "$ python -V" and show me the output? Commented Jun 24, 2018 at 7:40
  • "Python 2.7.12" Commented Jun 24, 2018 at 7:42
  • How about "$which -a pip" Commented Jun 24, 2018 at 7:43
  • output is "/usr/bin/pip" Commented Jun 24, 2018 at 7:50
  • Just in case... What's the output for ls -la /usr/bin/pip? Commented Jun 24, 2018 at 8:04

2 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

4 Comments

Python 3 uses "/usr/bin/pip" head /usr/local/bin/pip shows "No such file or directory".
Hmm, have you installed pip in other ways, for example bootstrap.pypa.io/get-pip.py?
head /usr/local/bin/pip shows "No such file or directory": Maybe just open a new console will solve it.
@TanmoyGhosh Glad to hear. It's better if you can share about how you solved the problem :)
-2

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.

3 Comments

Bash is a Linux/Mac console.
i am in Ubuntu- 16.04. and i think you are in windows.
Yeah!! I am in Windows

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.