pip3.7 is installed and I can see its location using whereis. However centos says command not found. I don't understand why command not found. And I don't understand why later it is found.
Asked
Active
Viewed 431 times
1
Tiina
- 2,920
- 3
- 17
- 26
-
So `pip3.7` works on it's own, but not with sudo? If it's not a quoting thing (try with double / single quotes around pip3.7) then maybe sudo's not set up to allow that command... or sudo's path is different – Xen2050 Dec 26 '18 at 05:17
-
There's also no reason to use `sudo` in this example when you're already logged in as root. – n8te Dec 26 '18 at 05:18
-
I know no need to use sudo when logged in as a root. What I don't understand is `why command not found, and why command found`. >_ – Tiina Dec 26 '18 at 05:21
-
2Because sudo doesn't evaluate the same $PATH as root. Related: https://superuser.com/questions/709515/command-not-found-when-using-sudo – n8te Dec 26 '18 at 05:23
-
@n8te how to see the difference, the $PATH for sudo; and the $PATH for ordinary – Tiina Dec 26 '18 at 05:26
