Install python & pip for azure automation

Raj D 581 Reputation points
2022-10-26T23:18:16.043+00:00

Hello

I'm trying to use python in azure automation runbook with a hybrid worker group. I have python installed on the underlying machine (C:\Program Files\Python3). When I try to execute the runbook run into the following error.

Error: python.exe is not recognized as a command or operable program. Install the language interpreter and add the installation path to PATH environment variable. Looking for the executable at default location C:\WPy64-3800\python-3.8.0.amd64\python.exe.

254488-image.png

I am not sure why the default location C:\WPy64-3800\python-3.8.0.amd64\python.exe and how to fix this?

Thanks in advance

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,114 questions
0 comments No comments
{count} votes

Accepted answer
  1. Maxim Sergeev 6,566 Reputation points Microsoft Employee
    2022-10-26T23:54:43.927+00:00

    Hi there,

    Did you do this?

    For cloud jobs, Python 3 jobs sometimes fail with an exception message invalid interpreter executable path. You might see this exception if the job is delayed, starting more than 10 minutes, or using Start-AutomationRunbook to start Python 3 runbooks. If the job is delayed, restarting the runbook should be sufficient. Hybrid jobs should work without any issue if using the following steps:

    Create a new environment variable called PYTHON_3_PATH and specify the installation folder. For example, if the installation folder is C:\Python3, then this path needs to be added to the variable.

    Restart the machine after setting the environment variable.

    https://learn.microsoft.com/en-us/azure/automation/automation-runbook-types#known-issues

    0 comments No comments

0 additional answers

Sort by: Most helpful