azure - 如何将新文件路径添加到azure应用程序服务中的环境变量Path

标签 azure azure-devops azure-web-app-service web2py pyjwt

我正在为 web2py 项目创建 azure Web 应用程序,我的应用程序使用 jwt 包。现在我要安装pyjwt package到 azure 应用程序服务。通过 kudu 安装后,它安装在不在 azure 应用服务环境变量中的其他位置。

enter image description here

Now either I need to install this package at default location or I need to include D:\home\python364x64\Script to environment variable PATH.

我不知道如何执行此方法?如果有人帮助我解决这个问题那就太好了

最佳答案

关于如何给azure添加环境变量可以引用这个wiki:Adding environment variables 。您需要applicationHost.xdt,将其放在d:\home\site文件夹下。

下面是一个示例。

<?xml version="1.0"?> 
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> 
 <system.webServer> 
  <runtime xdt:Transform="InsertIfMissing">
   <environmentVariables xdt:Transform="InsertIfMissing">
    <add name="PATH" value="D:\home\python364x64\Scripts;%PATH%" xdt:Locator="Match(name)" 
    xdt:Transform="InsertIfMissing" />    
   </environmentVariables>
  </runtime> 
 </system.webServer> 
</configuration>

enter image description here

关于azure - 如何将新文件路径添加到azure应用程序服务中的环境变量Path,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59786718/

相关文章:

azure - 更新 azure api 管理服务的位置时出错

azure - 使用其 REST API 将 Azure DevOps 指标获取到 Elasticsearch 数据库中?

azure - 从私有(private) docker 镜像在 azure 上运行单个容器应用程序返回 : :( Application Error

Azure DevOps Pipeline 托管代理 - 在哪里可以找到系统功能?

Azure 网站 : "Home" on C or D drive?

azure - Powershell 中的 Set-AzureRmWebApp 更改未出现在 Azure 门户中

azure - 获取 AzDO 的 Azure 主体 ID

安卓 | Fresco/FrescoLib + Azure

c# - Azure、ASP.NET Core 2.0、使用客户端证书通过 HttpClient 调用 Post 会导致 "The client certificate credentials were not recognized"

git - 支持在 Azure DevOps 中签名标签和验证签名