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.

4
  • Python 3 uses "/usr/bin/pip" head /usr/local/bin/pip shows "No such file or directory". Commented Jun 24, 2018 at 7:58
  • Hmm, have you installed pip in other ways, for example bootstrap.pypa.io/get-pip.py? Commented Jun 24, 2018 at 8:00
  • head /usr/local/bin/pip shows "No such file or directory": Maybe just open a new console will solve it. Commented Jun 24, 2018 at 8:01
  • @TanmoyGhosh Glad to hear. It's better if you can share about how you solved the problem :) Commented Jun 25, 2018 at 20:26
-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
  • 1
    Bash is a Linux/Mac console. Commented Jun 24, 2018 at 7:47
  • 1
    i am in Ubuntu- 16.04. and i think you are in windows. Commented Jun 24, 2018 at 7:52
  • Yeah!! I am in Windows
    – A K
    Commented Jun 24, 2018 at 7:53

Not the answer you're looking for? Browse other questions tagged or ask your own question.