admin管理员组文章数量:1122846
I have Azure function app which is deployed via pipeline in Azure DevOps. Deployment completes without any issues, but when I navigate to my app in Azure portal, on Overview page I get error message Microsoft.Azure.WebJobs.Script: WorkerConfig for runtime: python not found.
Runtime version displays Error, instead of Python version.
What I've done:
- In deployment pipeline I'm setting the Python version as follows:
az functionapp config set --name ${{ parameters.pyFuncAppName }} \
--resource-group ${{ parameters.resourceGroupName }} \
--linux-fx-version 'Python|3.10'
- Check App configuration in Configuration -> General settings.
- On Stack settings I have Stack = Python
- Python Version is 3.10.
- SSH into App host
python --version
givesPython 3.10.15
- SSH into Kudu SSH
python
command not foundpython3 --version
givesPython 3.9.2
<-- is this the root of the issue?
Unfortunately this is a client project and everything is extremely sensitive so I cannot publish pipeline code or function app code but I'm happy to provide clarification if needed.
I have Azure function app which is deployed via pipeline in Azure DevOps. Deployment completes without any issues, but when I navigate to my app in Azure portal, on Overview page I get error message Microsoft.Azure.WebJobs.Script: WorkerConfig for runtime: python not found.
Runtime version displays Error, instead of Python version.
What I've done:
- In deployment pipeline I'm setting the Python version as follows:
az functionapp config set --name ${{ parameters.pyFuncAppName }} \
--resource-group ${{ parameters.resourceGroupName }} \
--linux-fx-version 'Python|3.10'
- Check App configuration in Configuration -> General settings.
- On Stack settings I have Stack = Python
- Python Version is 3.10.
- SSH into App host
python --version
givesPython 3.10.15
- SSH into Kudu SSH
python
command not foundpython3 --version
givesPython 3.9.2
<-- is this the root of the issue?
Unfortunately this is a client project and everything is extremely sensitive so I cannot publish pipeline code or function app code but I'm happy to provide clarification if needed.
Share Improve this question edited Nov 22, 2024 at 9:54 Kilipukki asked Nov 22, 2024 at 9:25 KilipukkiKilipukki 3936 silver badges17 bronze badges 3 |1 Answer
Reset to default 0I have created a Python Azure function app with runtime stack Python 3.10
. Refer the blog.
Tested the Python version in KUDU SSH and App Host.
KUDU SSH(Bash):
WEBSSH:
This behavior doesn't affect the function app's performance.
Create Virtual environment with required Python version.
pyvenv.cfg:
home = C:\Users\uname\AppData\Local\Programs\Python\Python310
include-system-site-packages = false
version = 3.10.9
executable = C:\Users\uname\AppData\Local\Programs\Python\Python310\python.exe
command = C:\Users\uname\AppData\Local\Programs\Python\Python310\python.exe -m venv C:\Users\uname\pyfn\env
Add Functions_Worker_Runtime= Python
in Azure FunctionApp=>Settings=>Environment Variables
:
Deploy the function to Azure:
Portal:
本文标签: Azure Functions MicrosoftAzureWebJobsScript WorkerConfig for runtime python not foundStack Overflow
版权声明:本文标题:Azure Functions: Microsoft.Azure.WebJobs.Script: WorkerConfig for runtime: python not found - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736304840a1932377.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
python3 version
was3.9.2
in Kudo site (BASH) even if I newly created a function app with a python stack of3.10
. Your app should not be running in Kudo container and this behavior may not be relevant. Besides, it didn't seem to be the issue of theaz functionapp config se
command, either, I ran the same command with different--linux-fx-version
of'Python|3.10'
and'Python|3.11'
in Cloud shell; the versions were updated in both app configuration web UI and in the host (SSH) site. – Alvin Zhao - MSFT Commented Nov 25, 2024 at 6:32