Azure-App-Service / python

base image for Python on linux app service
Apache License 2.0
55 stars 49 forks source link

Installing python requirements #17

Open amahlaka opened 5 years ago

amahlaka commented 5 years ago

Should the requirements from requirements.txt be automatically installed when using python3.7 version of the container on my webapp? Whenever i try to depoly my project, nothing from the requirements.txt gets installed, i had to use a custom startup command to get the app to work

AliciaSabat commented 5 years ago

I had the same issue with python 3.7 and also solved it by using custom start up command.

gregroberts commented 5 years ago

I had this issue deploying via the az CLI and via VSCode.

For me the cause of the issue was that the deployment source was not set to Git.

Without the deployment source being Git, the requirements.txt aren't installed.

Follow instructions here to change deployment source to Git, if using VSCode:

https://code.visualstudio.com/docs/python/tutorial-deploy-app-service-on-linux#_deploy-your-app-using-git

andrewholler commented 4 years ago

Potentially a related issue, https://github.com/microsoft/Oryx/issues/557

andrewholler commented 4 years ago

Solution from the other thread, set app setting SCM_DO_BUILD_DURING_DEPLOYMENT=true. This way the app service does build automation for you when doing a ZIP deployment. See this for more info: https://docs.microsoft.com/en-us/azure/app-service/deploy-zip#deploy-zip-file-with-azure-cli

cdeil commented 4 years ago

I had a similar issue. Asked for help here: https://docs.microsoft.com/en-us/answers/questions/28316/python-web-app-zip-deploy-fail.html