代码之家  ›  专栏  ›  技术社区  ›  Sheldon

在Azure应用程序服务上部署flask应用程序时“单击设置命令中出错”

  •  0
  • Sheldon  · 技术社区  · 3 年前

    我正试图使用python-pip-install在我的应用程序服务中安装azure cli,但我遇到了一个错误。

    
    You are using pip version 9.0.3, however version 21.1.3 is available.
    
    You should consider upgrading via the 'python -m pip install --upgrade pip' command.
    

    我试过这个建议,但也不起作用。所以我在我的应用程序服务中添加了Python 3.6.4 x64扩展并安装了它。但控制台仍然使用2.7版本。

    我缺少什么?

    0 回复  |  直到 3 年前
        1
  •  2
  •   Krzysztof Madej    4 年前

    请在Azure应用程序服务上安装扩展:

    enter image description here

    单击添加并选择您想要的:

    enter image description here

    然后接受条件。之后,您需要更改路径,如中所示 documentation

    可以通过 Xdt transform

    <?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> 
    

    请同时检查 question

    推荐文章