I published a python 3.10 function app to azure, locally the function runs successfully.
The deployment is successful, but executing the function on cloud, returning the following error:
Result: Failure Exception: ModuleNotFoundError: No module named 'cv2'. Please check the requirements.txt file for the missing module. For more info, please refer the troubleshooting guide: https://aka.ms/functions-modulenotfound Stack: File "/azure-functions-host/workers/python/3.10/LINUX/X64/azure_functions_worker/dispatcher.py", line 387, in _handle__function_load_request func = loader.load_function( File "/azure-functions-host/workers/python/3.10/LINUX/X64/azure_functions_worker/utils/wrappers.py", line 48, in call raise extend_exception_message(e, message) File "/azure-functions-host/workers/python/3.10/LINUX/X64/azure_functions_worker/utils/wrappers.py", line 44, in call return func(*args, **kwargs) File "/azure-functions-...
The requirements.txt file exists in the root folder and contains list of all packages including cv
opencv-contrib-python==4.5.5.62
opencv-python==4.5.5.62
(I can see it in Azure portal -> Function App -> App Files)
What am I missing?


The issue was that these two configurations were in the function app.
Removing them enabled the installation of packages specified in the requirements.txt file: