How to Install Python 3.9 in Azure Webjobs?
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
Read more here: Source link
