Python 3 function & Node-red disconnected

Thank you for the clarification & the suggestion. I will try this.

I am also struggling with the python3 node; using pyhtonshell node as a work around for the time being to execute a python script and it works perfectly.
At the example above I believe there are brakets missing and code should be as follows:

[{"id":"2dd28338.06ea0c","type":"inject","z":"76982441.84c0cc","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":380,"wires":[["78a3aac2.86168c"]]},{"id":"78a3aac2.86168c","type":"exec","z":"76982441.84c0cc","command":"python -u -c \"for r in range(10): print ('hello world\\n')\"","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":480,"y":380,"wires":[["b8129d5f.eba96"],["5c2a80b5.e9ba6"],[]]},{"id":"b8129d5f.eba96","type":"debug","z":"76982441.84c0cc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":790,"y":360,"wires":[]},{"id":"5c2a80b5.e9ba6","type":"debug","z":"76982441.84c0cc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":790,"y":400,"wires":[]}]

if you look at the Info tab for node-red-contrib-python3 you will see:
python3_warn

(I put the red box in.) Also note that the node has not been updated in over 2 years....

Hi all,

as the code has not been updated in some years the main issue could be that the "spawn" command still uses a pretty old style. You can check

.node-red/node_modules/node-red-contrib-python3-function/lib/python3-function.js

there you can find the line

function spawnFn(self) {
self.child = spawn('python3', ['-uc', self.func.code], {
stdio: ['pipe', 'pipe', 'pipe', 'ipc']

make sure it uses the right python version

Guys, I solved that problem, just writing this command on an AWS terminal Linux:
$ sudo apt-get install python-is-python3