How can I install a program in my Azure Function

Jose Joab Romero Humba 41 Reputation points
2021-05-05T20:20:14.883+00:00

I am working with sox in python to modify some audios, I've added sox in the requeriments file but when I deploy and call the function i get the next error: "Result: Failure Exception: FileNotFoundError: [Errno 2] No such file or directory: 'sox' " i think this problem happend because I have to install sox in the machine where the function works with the next command "apt-get install sox" but I don't know how to do it.

I would greatly appreciate the help

ref: https://pypi.org/project/sox/

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,909 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 70,936 Reputation points Moderator
    2021-05-06T01:38:22.57+00:00

    Updated:

    We can see that under the instructions here it talks about installing it via apt-get first. Looks like using pip doesn't install it from the source, which is unfortunate here because otherwise, remote Build would have handled it.

    In this case, it looks like build native dependency will also not help. Using a custom container would be a better approach in this case.

    ------------------------------

    @Jose Joab Romero Humba You need to define your package in requirements.txt file of your project.

    azure-functions -->Default  
    sox  
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.