Hello Greg Vance a,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
Problem
I understand that your .python_packages folder not deploying to Azure Python function
Solution
To resolve this issue and ensure that your Python packages are correctly deployed to your Azure Function, you will need to do the followings:
- In your function app's root directory, create a
requirements.txt
file. This file should list all the Python packages your function depends on. Make sure to include the necessary packages in this file. - When deploying your function, ensure that the
requirements.txt
file is included in your deployment artifact (such as the zip package). This file tells Azure Functions which packages to install. - Navigate to your function app in the Azure portal. Under the Platform features tab, select Advanced tools (Kudu). In the Kudu console, go to Debug console > CMD.
- In the CMD console, run the following command to install the Python packages from the
requirements.txt
file:pip install -r D:\home\site\wwwroot\requirements.txt
- After installing the packages, restart your function app to apply the changes:
az functionapp restart --name <functionAppName> --resource-group <resourceGroupName>
Accept Answer
I hope this is helpful! Do not hesitate to let me know if you have any other questions.
** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful ** so that others in the community facing similar issues can easily find the solution.
Best Regards,
Sina Salam