Flask API deployment fails on App Service

JK2 11 Reputation points
2022-04-07T14:23:09.637+00:00

I'm getting the following error when trying to deploy my Flask API to App Service. Followed the docs exactly. My environment is called venv.

5:09:34 PM dms-twitter-api: /tmp/oryx/platforms/python/3.9.12/bin/python3.9: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /tmp/oryx/platforms/python/3.9.12/lib/libpython3.9.so.1.0)
5:09:34 PM dms-twitter-api: Removing existing manifest file
5:09:34 PM dms-twitter-api: /tmp/oryx/platforms/python/3.9.12/bin/python3.9: /lib/x86_64-linux-gnu/libpthread.so.0: version `GLIBC_2.30' not found (required by /tmp/oryx/platforms/python/3.9.12/lib/libpython3.9.so.1.0)
5:09:34 PM dms-twitter-api: Python Virtual Environment: antenv
5:09:34 PM dms-twitter-api: Creating virtual environment...
5:09:36 PM dms-twitter-api: /opt/Kudu/Scripts/starter.sh oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform python --platform-version 3.9 -i /tmp/8da18a038cf40fa --compress-destination-dir -p virtualenv_name=antenv --log-file /tmp/build-debug.log 
5:09:36 PM dms-twitter-api: Deployment Failed.
5:09:46 PM dms-twitter-api: Deployment failed.

I'm using Windows to create my API and deploying to a python 3.9 runtime (Linux; no Windows option available). SCM_DO_BUILD_DURING_DEPLOYMENT is set to true (in the .deployment config)

What could be the issue here?

Azure App Configuration
Azure App Configuration
An Azure service that provides hosted, universal storage for Azure app configurations.
237 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,880 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. JK2 11 Reputation points
    2022-04-07T15:36:32.323+00:00

    Upgrading python to 3.9.12 and recreating the virtual environment worked for me.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.