0

I wrote print('Hello world!') in the shell of Jenkins. enter image description here The error shows below: enter image description here

Can anyone help with the issue? Thanks

2
  • Check whether python is correctly installed in your system by typing the following in cmd python --version Commented Jul 11, 2020 at 5:32
  • I type python --version it returns: python2.7.18; type python3 --version it returns python3.7.7 Commented Jul 11, 2020 at 5:40

1 Answer 1

1

You are NOT executing python program in the given screenshot, instead you are executing a shell script. It's evident from the error screenshot where it states executable as

[python] $ /bin/sh -xe /tmp/jenkinsxxxxxxxxx.sh

python is the name of your jenkins host (and job too looking at your logs), presumably you are confused with that. Try following instead

echo "Hello world"

and it'll print alright. Basically any and every shell script command will work just fine.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.