Cannot run program "python" or Can't find a default python

Cannot run program "python" or Can't find a default python

Use case

While trying to run a python script, this error can be found. It usually occurs when the python is not installed/set up properly.

Solution

Try specifying the complete path of the python.exe instead of py and then in the argument specify the $COMPLETE_V3_JSON_FILE. The command should look like below

<python directory>/python.exe MultipleRequestsV3.py ChildRequestsV3.json $COMPLETE_V3_JSON_FILE

The complete path of python can be found by running the command where python in cmd

Cant find a default python

                  New to ADSelfService Plus?

                    • Related Articles

                    • Error - Can't find a default Python

                      In version 10.6 and above when creating a Custom Trigger  you will need to paste a .txt file in the  Executor path as shown below instead of entering the scripts name there.  To create a txt file you need to path to => ManageEngine\Service ...
                    • Python script to automate FCR

                      Please find the attached Python script on this link  to automate FCR via custom trigger when the request is created and resolved by the same technician. The link contains two Python scripts with the name FCR.py (this script can be used when MSP is ...
                    • Some errors related to Python when trying to run a script in SDP MSP

                      Case 1: We could see cases where users come across the below error when trying to execute scripts. This happens if the requests library is not imported.   In order to import the requests library in Python, follow the steps below: 1. Open cmd as admin ...
                    • How to setup Python on the Server

                      This article explains how to set up the ServiceDesk plus server to run python scripts. 1. The first step is to install python on the application server and you can download it from here . Any version above 3.4.1 should work fine. Once you've ...
                    • How to setup Python on the Server

                      This article explains how to set up the ServiceDesk Plus MSP server to run python scripts. 1. The first step is to install python on the application server and you can download it from here. Any version above 3.4.1 should work fine. Start the setup ...