This is my (example) python script:
!#${bamboo.build.working.directory}/../${bamboo.planKey}/env/bin/python3 <<EOF
print("Hello World")
EOF
This is the error I am getting:
/opt/bamboo-home/temp/RTE-RT-HDR-14-ScriptBuildTask-7622273598056907388.sh: 1: /opt/bamboo-home/temp/RTE-RT-HDR-14-ScriptBuildTask-7622273598056907388.sh: !#/opt/bamboo-home/xml-data/build-dir/RTE-RT-HDR/../RTE-RT/env/bin/python3: not found
I have successfully created the virtualenv in a previous stage. Logging into the machine and executing:
/opt/bamboo-home/xml-data/build-dir/RTE-RT-HDR/../RTE-RT/env/bin/python3
starts python3.
It fails with both Interpreters "Shell" and "/bin/sh or cmd.exe".