Python web app ZIP deploy fail

asked 2020-05-20T13:49:33.19+00:00
Christoph Deil 1 Reputation point

I have a Python web app that I ZIP-deploy, and for some reason it keeps creating and removing a virtual environment in a loop, never finishing.

2020-05-19T23:25:53.967623000Z Found virtual environment .tar.gz archive.
2020-05-19T23:25:53.968226705Z Removing existing virtual environment directory /antenv...
2020-05-19T23:25:53.976257370Z Extracting to directory /antenv...
2020-05-19T23:25:56.205290595Z Using packages from virtual environment antenv located at /antenv.
2020-05-19T23:25:56.206097405Z Updated PYTHONPATH to ':/antenv/lib/python3.7/site-packages'
2020-05-19T23:25:56.216082621Z Found virtual environment .tar.gz archive.
2020-05-19T23:25:56.216518226Z Removing existing virtual environment directory /antenv...
2020-05-19T23:25:56.331714066Z Extracting to directory /antenv...
2020-05-19T23:25:57.226820579Z Using packages from virtual environment antenv located at /antenv.
2020-05-19T23:25:57.227425286Z Updated PYTHONPATH to ':/antenv/lib/python3.7/site-packages:/antenv/lib/python3.7/site-packages'


I use this command to deploy:

az webapp deployment source config-zip --src

My requirements.txt contains this:


I have a wheel hcem-0.1.dev359+g350d752.d20200520-py3-none-any.whl in the ZIP file.

My contains this:

python -m uvicorn application:app --host


I tried in the app settings to put or passing the start command directly.

This seems related: and also this one but I couldn't figure out my issue with either one.

What is the "Found virtual environment .tar.gz archive." message about? Which file exactly?

Any suggestion to debug or fix this deployment issue?

Azure Web Apps
Azure Web Apps
A feature of Azure App Service used to create and deploy scalable, mission-critical web apps.
4,294 questions
{count} votes