0

我正在尝试使用 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 版本。

我错过了什么?

4

1 回答 1

1

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

在此处输入图像描述

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

在此处输入图像描述

然后接受条件。之后,您需要更改路径,这在文档中显示

可以通过Xdt 变换完成

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

请检查这个问题

于 2021-07-08T09:16:39.090 回答