Skip to content

Error executing hook: executable file not found in $PATH

I try to deploy service into minikube cluster via DevSpace tool.

I have the following hook in my devspace.yaml

  - command: pip install -r requirements.txt
        deployments: all

But at the time it executes it I got the error:

[fatal]  Error deploying: Error executing hook: exec: "pip install -r requirements.txt": executable file not found in $PATH

I am able to execute pip install -r requirements.txt from regular terminal in Ubuntu. But when it does it via hook it throws the error.

Could somebody help me to understand why it throws the error at that case?

The requirements.txt and devspace.yaml are located at the same level in the folder. enter image description here



DevSpace hooks are different from custom commands. Hooks need a binary as command. In your case just pip and then the rest needs to be passed via args as separate entries of an array. Similar to ENTRYPOINT of a Dockerfile.

User contributions licensed under: CC BY-SA
3 People found this is helpful