Azure Durable Function - Python - Module not found

Tristan van der Vlugt 1 Reputation point
2022-09-29T06:50:20.483+00:00

Hi All,

I'm trying to create and run a durable function but the modules in requirements.txt are not being installed.

Requirements.txt

aiohttp==3.8.3  
aiosignal==1.2.0  
anyio==3.6.1  
async-timeout==4.0.2  
attrs==22.1.0  
azure-core==1.25.1  
azure-functions==1.11.2  
azure-functions-durable==1.1.6  
azure-storage-blob==12.13.1  
azure-storage-file-datalake==12.8.0  
cached-property==1.5.2  
certifi==2022.9.24  
cffi==1.15.1  
charset-normalizer==2.1.1  
cryptography==38.0.1  
frozenlist==1.3.1  
furl==2.1.3  
h11==0.12.0  
httpcore==0.15.0  
httpx==0.23.0  
idna==3.4  
isodate==0.6.1  
lxml==4.9.1  
msrest==0.7.1  
multidict==6.0.2  
oauthlib==3.2.1  
orderedmultidict==1.0.1  
platformdirs==2.5.2  
pycparser==2.21  
PyJWT==2.5.0  
python-dateutil==2.8.2  
pytz==2022.2.1  
requests==2.28.1  
requests-file==1.5.1  
requests-oauthlib==1.3.1  
requests-toolbelt==0.9.1  
rfc3986==1.5.0  
six==1.16.0  
sniffio==1.3.0  
typing_extensions==4.3.0  
urllib3==1.26.12  
yarl==1.8.1  
zeep==4.1.0  
  

Error message:

Result: Failure Exception: ModuleNotFoundError: No module named 'azure.durable_functions'. 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.9/LINUX/X64/azure_functions_worker/dispatcher.py", line 355, in _handle__function_load_request func = loader.load_function( File "/azure-functions-host/workers/python/3.9/LINUX/X64/azure_functions_worker/utils/wrappers.py", line 42, in call raise extend_exception_message(e, message) File "/azure-functions-host/workers/python/3.9/LINUX/X64/azure_functions_worker/utils/wrappers.py", line 40, in call return func(*args, **kwargs) File "/azure-functions-host/workers/python/3.9/LINUX/X64/azure_functions_worker/loader.py", line 127, in load_function mod = importlib.import_module(fullmodname) File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/home/site/wwwroot/perfectview/__init__.py", line 11, in 
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,301 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MuthuKumaranMurugaachari-MSFT 22,146 Reputation points
    2022-10-04T13:17:28.73+00:00

    Update for the community:

    @Tristan van der Vlugt resolved the issue by following the steps:

    1. Go into SSH and executed the following command to get the packages installed cd /home/site/wwwroot/requirements.txt pip install --target="./.python_packages/lib/site-packages" -r ./requirements.txt

    Please refer to docs: The package can't be found for more info on this. Thank you for sharing this and glad that you resolved the issue.

    1 person found this answer helpful.