我正在为 web2py 项目创建 azure Web 应用程序,我的应用程序使用 jwt
包。现在我要安装pyjwt package到 azure 应用程序服务。通过 kudu 安装后,它安装在不在 azure 应用服务环境变量中的其他位置。
Now either I need to install this package at default location or I need to include
D:\home\python364x64\Script
to environment variablePATH
.
我不知道如何执行此方法?如果有人帮助我解决这个问题那就太好了
最佳答案
关于如何给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>
关于azure - 如何将新文件路径添加到azure应用程序服务中的环境变量Path,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59786718/