Thanks for reaching out to Q&A.
When developing locally using the Azure Functions Core Tools or Visual Studio Code, add the names and versions of the required packages to the requirements.txt file and install them using pip.
Reference : https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference-python?tabs=azurecli-linux%2Capplication-level#package-management
If you have properly done the above steps and if it still doesnt work. Please explore the below steps
- Do a remote build when you are deploying from VS code to Azure via the func command. Generally, if your Azure Functions Core tools are updated to the latest version, it should ideally perform a remote build. Please check the below articles for more details: https://learn.microsoft.com/en-us/azure/azure-functions/functions-deployment-technologies#remote-build
- Alternatively, consider using Docker to deploy the app in order to bypass the Zip deploy size limit. For more information on Deployment technologies available in Azure Functions, check this great article: https://learn.microsoft.com/en-us/azure/azure-functions/functions-deployment-technologies
I hope this helps!
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.