I have successfully installed a Python Function on a Linux VM, but due to some dependencies I need it to be deployed on Windows. It is set to be deployed on Linux, but is it possible to deploy it on Windows VM?
At this time no, Python Functions are only supported in App Service Plans using Linux.
Your Azure Function App has 'FUNCTIONS_WORKER_RUNTIME' set to 'dotnet'
while your local project is set to 'python'. You can pass --force to
update your Azure app with 'python' as a 'FUNCTIONS_WORKER_RUNTIME'
C:\Users\-----\source\repos\func\MyFunctionProj>func azure functionapp publish pyfunc1 --force
Setting 'FUNCTIONS_WORKER_RUNTIME' to 'python' because --force was
passed Getting site publishing info... Publishing Python functions is
only supported for Linux FunctionApps
Related
I am creating docker containers to deploy my apps via API, so there is a docker for app_manager that exposes an API and a docker container for an application(s) itself. Both app_manager and deploying applications are written in Python. I am testing deployment locally prior to deploying on the server. After the successful installation of app_manager I sent a request to deploy a specific version of my application via app_manager API (that uses subprocess.run) in a web browser. However, the response is null and by checking the docker logs I found the following error:
docker: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by docker)
I do not use Jenkins and adding libc6 library to DockerFile does not change anything. I still can install my app in Docker container manually with a couple of bash commands. I can
even deploy my app in the VSCode editor via subprocess.run() directly. However, how can I fix it, so I can deploy via sending API request?
I am using Ubuntu 22.04.1 LTS, Python 3.8, Docker version 20.10.12, build 20.10.12-0ubuntu4
Thank you
I deployed my Python Django project to Azure Web Service Linux environment, and found an error most likely caused by the version of Azure's own Python version (see this post Azure Text to Speech Error: 0x38 (SPXERR_AUDIO_SYS_LIBRARY_NOT_FOUND) when deploying to Azure App Services Linux environment ). However, I cannot seem to find a way to upload my own Python package (3.10) to Azure Web Service Kudu site. Is there a way to do it?
Thanks.
Currently, This is not possible, the latest python runtime available in the Linux web app is 3.9
and in the other question, The default Linux Kudu page has a minimum number of features available when compared to windows and so you cannot directly drag and drop your zip file. If you need to install more components or language runtimes, you just need to use Kudu SSH terminal using apt-get install <packages>.
Also, try checking Configure a Linux Python app for Azure App Service
Python 3.10 is now supported on App Service, so for this particular problem, you can update the configuration to Python 3.10.
When trying to use the following command:
az webapp up --sku F1 --name ap-name --resource-group my-rg --html
from a Linux box, I get:
The ResourceGroup 'my_rg' cannot be used with the os 'Windows'. Use a different RG.
The project is written in Python/Flask on Fedora. There is a resource file available. The resource group I specified is a Linux resource. Nowhere is Windows involved in this project.
I can deploy to a Windows Resource group, but it obviously doesn't work.
What am I doing wrong?
Thanks
From the documentation page:
Create a webapp and deploy code from a local workspace to the app. The
command is required to run from the folder where the code is present.
Current support includes Node, Python, .NET Core and ASP.NET. Node,
Python apps are created as Linux apps. .Net Core, ASP.NET, and static
HTML apps are created as Windows apps. Append the html flag to deploy
as a static HTML app.
Have you tried specifying Linux as the OS type?
[--os-type {Linux, Windows}]
I upgraded my AZ CLI and it worked.
az updgrade --yes
The I set the CLI to auto update.
az config set auto-upgrade.enable=yes
I install my python modules via pip for my Azure Web Apps. But some of python libraries that I need are only available in conda. I have been trying to install anaconda on Azure Web Apps (windows/linux), no success so far. Any suggestions/examples on how to use conda env on azure web apps?
Currently, Azure App Service only supports the official Python to be installed as extensions. Instead of using the normal App Service, I would suggest you to use a Webapp for Container so that you can deploy your web app as a docker container. I suppose this is the only solution until Microsoft supports Anaconda on App Service.
We've recently moved from App Service to App Service Environment on Azure. We need Python 3.6 to run the web API. But we're not able to install the extensions. Are extensions disabled on App service environment. Azure by default offers Python 3.4.1. But few of the libraries need a minimum of 3.6.4 which is available as a extensions. Is there a workaround for this or are we limited to the default Python 3.4.1 available with Azure ?
In case you haven't seen already, see article
https://blogs.msdn.microsoft.com/pythonengineering/2016/08/04/upgrading-python-on-azure-app-service/
Microsoft says you can run newer versions, 3.4 is default purely to prevent breaking compatibility with existing sites.
Azure menu layout sometimes (annoyingly) changes from guides, but I was able to find it searching "Extensions" in the Menu for my App Service
This is indeed possible but took a bit of experimenting. I had to open the Kudu console from a VM which is inside the same VNet as the App Service Environment. From there on, it's a cake walk. You can also configure Web Jobs from the VM which is otherwise not possible from the portal.