![](/img/trans.png)
[英]Deploy Azure functions with Python from VS Code, function disappears after WEBSITE_RUN_FROM_PACKAGE app setting
[英]Issues with setting up a Azure python function app on VS Code
我在设置从本地计算机上的存储库克隆的 Azure Python 函数应用程序时遇到问题。 当我设置虚拟环境并点击调试以将 Function App 作为端点运行时,我收到以下错误:
> Executing task: .venv\Scripts\python -m pip install -r requirements.txt <
/usr/bin/bash: .venvScriptspython: command not found
The terminal process "C:\Users\jgarcia\AppData\Local\Programs\Git\bin\bash.exe '-c', '.venv\Scripts\python -m pip install -r requirements.txt'" terminated with exit code: 127.
有谁知道如何解决这个问题?
编辑 1:我通过单击 VS Code 中的调试来运行它
编辑2:我在终端中复制并粘贴了命令,但出现了完全相同的错误,但是当我像这样运行命令时:
.venv/Scripts/python -m pip install -r requirements.txt
有用。 所以似乎问题出在在 VS 代码中运行调试。 我该如何解决?
编辑 3:通过在命令行中键入以下内容,我找到了一种解决 VS Code 调试的方法:
func host start
虽然我仍然不知道为什么在 VS Code 中运行 debug 会运行错误的命令。 可能与使用 Bash 与 PowerShell 有关。
我不确定,但您可以尝试使用斜杠而不是反斜杠来运行它:
.venv/Scripts/python -m pip install -r requirements.txt
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.