No module named twilio found while working with azure functions

Below is the code,

import logging import json, os import azure.functions as func import twilio import twilio.rest from twilio.rest import Client def main(myblob: func.InputStream):     filename = logging.info(f"Python blob trigger function processed blob \n"              #f"Name: {myblob.name}\n"              #f"Blob Size: {myblob.length} bytes")     filename = logging.info(myblob.name)     print(filename)     #output - teamaudio/22108192-9a74-4b6e-a237.wav     fname = filename.split("/")[1]     print(fname)     client = Client(account_sid,auth_token) 

Error : No module named twilio found when we trigger azure functions

Please guide on how to import twilio, twilio.rest in azure functions.

Add Comment
1 Answer(s)

You need to install the dependencies , do you have requirement.txt which contains the dependencies?

Otherwise you can open Kudu and manually install the dependency using pip install twillio.

Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.