0

When I type the command

pip

it works fine (gives me a help page). But when I type the command

sudo pip

it gives me the response

sudo: pip: command not found

whereas for example 'sudo python' works fine. How is this situation possible? I am not very familiar with what is going 'behind the scenes' when I invoke a command with sudo

1 Answers1

0

There are some commands that can not be done as a normal user via sudo (ie. using cd to enter a root directory). This usually happens when the program is built-in to the shell and not a binary. You have to log in as a root user via su.

Alternatively, check your $PATH env variable, pip may not be located in any of those directories.

anti4r
  • 71