Search code examples
linuxraspbianoctoprint

pip in path but command not found


I'm running a fresh installed OctoPi image (0.18.0). I added pip to my PATH in .bashrc file and sourced it but when I try to run pip I'm getting -bash: pip: command not found error.

When I run /home/pi/oprint/bin/pip, pip is working properly.

My path:

pi@octopi:~ $ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games:/home/pi/oprint/bin/pip:

Solution

  • You added the full path of the executable to the path, but you're only supposed to add the directory of the executable. Every exectuable of said directory is then directly available without the directory prefix.

    In other words .. instead of /home/pi/oprint/bin/pip you should add /home/pi/oprint/bin/ to the path.