I am trying simply to run python --version
from Jenkins in both ways, as you see in the image
NOTE:
on the same machine that jenkins runs, if I run the same command or any other Python script, it runs with no problem but via jenkins doesn't recognize it.
and I get the following error:
15:16:19 C:\Project\Jenkins\XXX\XXX\XXX\XXX>exit 0
15:16:19 [TUNSDK] $ sh -xe C:\Users\XXX\jenkins3628552658524167869.sh
15:16:19 + sh python --version
15:16:19 sh: python: No such file or directory
15:16:19 Build step 'Execute shell' marked build as failure
15:16:20 Finished: FAILURE
How can I run a python script via jenkins