microsoft / vscode-azurefunctions

Azure Functions extension for VS Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions
MIT License
291 stars 134 forks source link

Cannot create azure function with python using vscode from mac #1180

Closed anindya5 closed 5 years ago

anindya5 commented 5 years ago
Repro steps:1.2.Action: azureFunctions.createNewProjectError type: ErrorError Message: Failed to run ". .env/bin/activate Steps of the output window ``` Running command: "brew tap azure/functions"... Updating Homebrew... ==> Auto-updated Homebrew! Updated 1 tap (homebrew/core). ==> Updated Formulae bitrise cfssl dcos-cli docker docker-completion dynare futhark gitlab-runner gmic jenkins jenkins-lts lolcat meson nginx opam openttd pegtl php-code-sniffer prometheus putty sshguard step stunnel swiftformat ttfautohint Finished running command: "brew tap azure/functions". Running command: "brew install azure-functions-core-tools"... Warning: azure/functions/azure-functions-core-tools 2.5.553 is already installed and up-to-date To reinstall 2.5.553, run `brew reinstall azure-functions-core-tools` Finished running command: "brew install azure-functions-core-tools". Running command: "python3.6 -m venv .env"... Finished running command: "python3.6 -m venv .env". Running command: ". .env/bin/activate && func init ./ --worker-runtime python "... /bin/sh: func: command not found Error: Failed to run ". .env/bin/activate && func init ./ --worker-runtime python" command. Check output window for more details. ``` I can still create venv and functions using azure cli from the mac, but not using vscode.
ejizba commented 5 years ago

It appears it can't find func in your path. First try restarting VS Code - sometimes environment variables changes aren't picked up immediately.

Second, I suppose you could try uninstalling and reinstalling the func cli. Brew might update the path during that

brew uninstall azure-functions-core-tools
brew install azure-functions-core-tools
anindya5 commented 5 years ago

This issue is now resolved. Thanks for this.