running azure function locally (conda)

Prasad, Rakesh 221 Reputation points
2021-03-04T08:28:45.163+00:00

hi,

I am trying to run azure function locally.

I want to use conda python for it. And I do not want to set python path at system level. (i have 4-5 python projects each using different conda environment).

function runs fine in Azure. My question is can i run it locally with conda?

my build process run fine, as settings.json and tasks.json can take python path as argument. and I am able to run it with one specific environment of conda.

but it seems launch is having an issue. how can i resolve it? 74160-azure-function-local-run.png

i am getting error as =>

> Executing task: func host start <  
  
Could not find a Python version. Python 3.6.x, 3.7.x, 3.8.x or 3.9.x is recommended, and used in Azure Functions.  
The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command func host start" terminated with exit code: 1.  
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,321 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Charles GOSSELIN 1 Reputation point
    2021-06-18T13:17:33.057+00:00

    Hello,

    I have the same issue.

    Did you solve yours ?