python script not executing in "execute python script" step

915 views
Skip to first unread message

Akiti Bala

unread,
Apr 27, 2020, 9:42:17 AM4/27/20
to Jenkins Users
this is error i got 
Started by user fwqe
Running as SYSTEM
Building in workspace C:\Program Files (x86)\Jenkins\workspace\Test
[Test] $ python C:\WINDOWS\TEMP\jenkins6513206815000733591.py
The system cannot find the file specified
FATAL: command execution failed
java.io.IOException: CreateProcess error=2, The system cannot find the file specified
	at java.lang.ProcessImpl.create(Native Method)
	at java.lang.ProcessImpl.<init>(Unknown Source)
	at java.lang.ProcessImpl.start(Unknown Source)
Caused: java.io.IOException: Cannot run program "python" (in directory "C:\Program Files (x86)\Jenkins\workspace\Test"): CreateProcess error=2, The system cannot find the file specified
	at java.lang.ProcessBuilder.start(Unknown Source)
	at hudson.Proc$LocalProc.<init>(Proc.java:252)
	at hudson.Proc$LocalProc.<init>(Proc.java:221)
	at hudson.Launcher$LocalLauncher.launch(Launcher.java:936)
	at hudson.Launcher$ProcStarter.start(Launcher.java:454)
	at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:109)
	at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
	at hudson.model.Build$BuildExecution.build(Build.java:206)
	at hudson.model.Build$BuildExecution.doRun(Build.java:163)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
	at hudson.model.Run.execute(Run.java:1856)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:428)
Build step 'Execute Python script' marked build as failure
Finished: FAILURE



script.PNG

Björn Pedersen

unread,
Apr 27, 2020, 10:01:27 AM4/27/20
to Jenkins Users
Hi,

this looks like there is no python in the path on the agent running the job. The "Execute python"  step will not magically supply a python installation.

Björn
Reply all
Reply to author
Forward
0 new messages