deil avatar image
0 Votes"
deil asked ryanchill commented

Python web app ZIP deploy fail

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?

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

What app service plan are you using @deil?

0 Votes 0 ·

Hi @deil,

I wanted to follow up with you to see if you were still having issues with deploying your Python web app through zip deploy. Let us know.


0 Votes 0 ·

0 Answers