I created a virtual environment in Azure pipelines to run the python script which is built on Python 3.9 (most of the libraries requires Python 3.9)
When I tried to open the .venv in Webjob it couldnt find python 3.9 version. researching further i found : Azure Webjobs by default has 2.7 and 3.4.
Is there any way to install Python 3.9 or what should I do?
My question is related to : specify-python-version-in-microsoft-azure-webjob
pyvenv.cfg file of my .venv points to python.exe of 3.9 which doesnt exist in azure webjob.
I created a virtual environment in Azure pipelines to run the python script which is built on Python 3.9 (most of the libraries requires Python 3.9)
When I tried to open the .venv in Webjob it couldnt find python 3.9 version. researching further i found : Azure Webjobs by default has 2.7 and 3.4.
Is there any way to install Python 3.9 or what should I do?
My question is related to : specify-python-version-in-microsoft-azure-webjob
pyvenv.cfg file of my .venv points to python.exe of 3.9 which doesnt exist in azure webjob.
Install a Custom Python Version:
If Python 3.9 is not pre-installed, you can deploy it manually:
a. Download Python 3.9
Download a portable version of Python 3.9 (Windows-compatible ZIP) from the official Python website or a trusted source.
Unzip the file and place it in a directory under your WebJob (e.g., site/wwwroot/python39).
b. Add Python 3.9 to Path
Use Kudu to edit the App Service's environment variables.
Go to the Configuration > General settings > Path mappings in your App Service.
Add the Python executable directory (site/wwwroot/python39) to the PATH environment variable.
c. Set Python Version in WebJob
In the WebJob configuration (e.g., a run.cmd or run.bat script), ensure the custom Python path is used. Example:
set PATH=%HOME%\site\wwwroot\python39;%PATH%
python --version
python your_script.py