Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello ,
I am using tsystem component to call the python script.
In tsystem component :
"/bin/bash"
"-c"
"python3 /path_where_py_is_placed/test.py"
Is this the correct way to call the python script in tsystem component ?
Hello
Any error are you getting? If Can't find Python executable "python3", ensure the Python paths are in the user's (not the system) PATH environmental variable. This article might help you.
Regards
Shicong
Actually the tSystem component wants all parts of the command in a separate line in the comment setting.
You should place the path to the python script also to a separate line.
You do not need "/bin/bash" and "-c". Simply call it this way:
"python3"
"/path_where_py_is_placed/test.py".
The explicite call of bash or any other shell interpreter is only needed if you want to use command only provided by the shell. Most other commands like ls are binary commands and do not need an explicite shell.
Hi Jlolling,
Tried removing the "/bin/bash" and "-c" , and putting
"python3"
"/path_where_py_is_placed/test.py" separately.
but getting error : Cannot run program "python3" error=2 No such file or directory.
Or instead of using the full path to python3 you can also take care python3 is path of the PATH environment variable. Check this by calling python3 just from any arbitrary folder.