Reputation: 664
I have access to the Azure Portal.
From there, i have setup a free so called "webapp" using the FlaskAzure(python) template. (https://github.com/azureappserviceoss/FlaskAzure)
I have installed MS Visual Studio 2015(with "python tools"), and MS Visual Studio 2017RC(which doesn't have python support just yet).
I want to install a library called "docx".
My question is: How am i supposed to install new libraies? It might be possible to install it in several ways, as i also have access to kudu with terminal access. I just wonder if i actually have to use the terminal, or if i can use the MS VS2015 with python tools to do this, and how?
Upvotes: 2
Views: 4520
Reputation: 664
The fix was actually to create a new webapp from scratch without flask and python. It has to be a regular webapp.
Then to add python as an extension.
As far as I have understood, this is because there is some changes going on with the python/flask webapps, and there will be a fix for this later on.
After I installed as described the link, it seems to work: https://web.archive.org/web/20190111131654/https://prmadi.com/running-flask-app-with-httpplatformhandler-in-azure-app-services/
It was a bit hard to understand it all from the tutorial, but if you have problems create a support ticket within the azure portal, as they will guide you through the guide.
Upvotes: 0
Reputation: 72191
Just create a requirements.txt
in the root of the project, when the build is going to be deployed, kudu will detect that file, scan it and try installing those packages automatically during deployment.
you can create requirements.txt
with pip freeze > requirements.txt
Take a look at this article: https://blogs.msdn.microsoft.com/azureossds/2015/06/29/install-native-python-modules-on-azure-web-apps-api-apps/
Upvotes: 1