Introduction and Explaination
i am trying deploy my code to azure function app (linux based , python code ) through CI.CD pipelines. at first it worked fine but after few deployments, i am import error , library not found . and when i check the artifacts, required files of libraries are missing. i didnt changed anything in azure-pipelines.yml file .In azure-pipelines.yml i have added script for python to install libraries from requirements.txt. does anyone have any idea about it
What I have tried
i have also added those bash commands in yml file but same issue.
bash: |
cd sub_folder
python3.6 -m venv worker_venv
source worker_venv/bin/activate
pip3.6 install setuptools
pip3.6 install -r requirements.txt
displayName: 'Install application dependencies'.
Issue
one more issue i am seeing is ,
Result: Failure Exception: ImportError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/site/wwwroot/worker_venv/lib/python3.6/site-packages/pyodbc.cpython-36m-x86_64-linux-gnu.so). Troubleshooting Guide: https://aka.ms/functions-modulenotfound Stack: File "/azure-functions-host/workers/python/3.6/LINUX/X64/azure_functions_worker/dispatcher.py", line 275, in _handle__function_load_request func_request.metadata.entry_point) File "/azure-functions-host/workers/python/3.6/LINUX/X64/azure_functions_worker/utils/wrappers.py", line 34, in call raise extend_exception_message(e, message) File "/azure-functions-host/workers/python/3.6/LINUX/X64/azure_functions_worker/utils/wrappers.py", line 32, in call return func(*args, **kwargs) File "/azure-functions-host/workers/python/3.6/LINUX/X64/azure_functions_worker/loader.py", line 76, in load_function mod = importlib.import_module(fullmodname) File "/usr/local/lib/python3.6/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 941, in _find_and_load_unlocked File "", line 219, in _call_with_frames_removed File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "/home/site/wwwroot/JFG_MATCHMERGE/init.py", line 7, in import pyodbc