目前有一个未解决的问题:
- 添加更改Python版本的功能
但是,作为一种变通办法,所有内容都在这里进行了解释(作者所有版权:Murat
Eken)
- 创建您的功能。
- 默认情况下,使用其他Python版本安装网站扩展并配置处理程序映射以使用该安装。
2.2。安装“ Python 3.6.2 x86”扩展。
2.3。转到“平台功能>应用程序设置
2.4。添加处理程序映射:
扩展名:fastCgi
处理器:D: home python362x86 python.exe
参数:D: home python362x86 wfastcgi.py
2.5添加一个名为WEBSITE_USE_PLACEHOLDER的应用程序设置并将其值设置为0。这对于解决Azure函数问题(该问题导致Python扩展程序在卸载函数应用程序后停止工作)之前的工作是必需的。
2.6。保存您的应用设置。
这是我的功能的输出
"3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:14:34) [MSC v.1900 32 bit(Intel)]"
您可以使用ARM模板自动化这些步骤,这是模板中有趣的部分:
{ "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", "contentVersion": "1.0.0.0", "parameters": { //... }, "variables": { // ... }, "resources": [ // ... { "type": "Microsoft.Web/sites", // ... "kind": "functionapp", "properties": { // ... "siteConfig": { "handlerMappings": [{ "arguments": "D:\home\python362x86\wfastcgi.py", "extension": "fastCgi", "scriptProcessor": "D:\home\python362x86\python.exe" }] // ... }, "resources": [{ "name": "python362x86", "type": "siteextensions", "apiVersion": "2016-08-01", "properties": {} // ... }] // ... } } ]}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)