【问题标题】:set up path in a webjob azure在 webjob azure 中设置路径
【发布时间】:2020-07-29 08:32:41
【问题描述】:

我尝试做以下事情:

setx /M PATH "%PATH%;D:\home\python364x86\Lib\site-packages"

但我得到以下信息:

错误:对注册表路径的访问被拒绝。

我该如何解决这个问题?

【问题讨论】:

    标签: azure webjob


    【解决方案1】:

    修改 PATH 并不简单,但可能。

    您可以使用如下代码:

    <?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="FOO" value="BAR" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing" />    
            <add name="PATH" value="%PATH%;%HOME%\FolderOnPath" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing" />    
          </environmentVariables>
        </runtime> 
      </system.webServer> 
    </configuration> 
    

    更多详情可以参考这个article

    【讨论】:

    • 在尝试安装 pip 后,我得到:警告:脚本 pip.exe、pip3.6.exe 和 pip3.exe 安装在“D:\local\AppData\Python\Python36\Scripts”中不在 PATH 上
    • 请参考这个类似的issue
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-04-11
    • 2013-10-14
    • 1970-01-01
    • 1970-01-01
    • 2013-10-06
    相关资源
    最近更新 更多