Azure-devops-docs: Requirement mentioned in requirements.txt file is not getting installed automatically.

Created on 4 Oct 2019  Â·  5Comments  Â·  Source: MicrosoftDocs/azure-devops-docs

I was following these steps to install my flask app which is having just sample application.py with some sample dependencies to some data science packages. The dependencies are mentioned in requirements.txt and as per step 8 it says the requirements will be installed automatically. Please note that I am not using a custom container image as done in the github sample project (python-sample-vscode-flask-tutorial) mentioned in this document. Also I tried to add a pip install command as post deployment inline script, pip3.6 install -r requirements.txt which fails with permission denied in kudu during deployment. Please let me know how to proceed on this.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri2 devops-cictech devopprod doc-enhancement

Most helpful comment

I've ran into the same issue. My problem was that I created an app service manually for Python and there is this parameter that gets added when you create a Python App Service from command line that is not created when you set up an App Service for Python manually.

{
"name": "SCM_DO_BUILD_DURING_DEPLOYMENT",
"value": "True",
"slotSetting": false
}

You'll need to go to App Service -> Configuration -> Application Settings -> New Application Setting and add it there.

image

Source: Enable/disable build actions (Configurable settings)
https://github.com/projectkudu/kudu/wiki/Configurable-settings#enabledisable-build-actions

All 5 comments

Thanks. I'm investigating; see https://github.com/MicrosoftDocs/vsts-docs/issues/5545, which is related.

I've ran into the same issue. My problem was that I created an app service manually for Python and there is this parameter that gets added when you create a Python App Service from command line that is not created when you set up an App Service for Python manually.

{
"name": "SCM_DO_BUILD_DURING_DEPLOYMENT",
"value": "True",
"slotSetting": false
}

You'll need to go to App Service -> Configuration -> Application Settings -> New Application Setting and add it there.

image

Source: Enable/disable build actions (Configurable settings)
https://github.com/projectkudu/kudu/wiki/Configurable-settings#enabledisable-build-actions

I've ran into the same issue. My problem was that I created an app service manually for Python and there is this parameter that gets added when you create a Python App Service from command line that is not created when you set up an App Service for Python manually.

{
"name": "SCM_DO_BUILD_DURING_DEPLOYMENT",
"value": "True",
"slotSetting": false
}

You'll need to go to App Service -> Configuration -> Application Settings -> New Application Setting and add it there.

image

Source: Enable/disable build actions (Configurable settings)
https://github.com/projectkudu/kudu/wiki/Configurable-settings#enabledisable-build-actions

@Dann1112 Looks like that resolved the issue of installing the requirements. Now I can see a .tar.gz file in the wwwroot folder with all the packages in it. Thanks :)

I spent a couple of days trying to figure that out! It's good to know that helped @MishalValiyakath ! Cheers !

Please, mention this early on in this tutorial! The requirements.txt not being installed is a recurring and very confusing issue. Because the deployment script requires you to have a requirements.txt present in your repo, but it does not automatically make use of it.

Was this page helpful?
0 / 5 - 0 ratings