I solved the problem by finding the path for python. The following works:
(
~get_sylabs = {|text|
format(
"/Users/prko/opt/anaconda3/bin/python.app -c \"import pyphen; out = pyphen.Pyphen(left=1, right=1, lang='it_IT').inserted('%'); print(out)\"",
text
).unixCmdGetStdOut.split($-)
}
)
x = ~get_sylabs.("Esempio, questa Stringa").do(_.postln)
x
Using ```.runInTerminal`` is ineffective because you cannot assign the result to a variable. Assigning a result to a variable is important for reusing the data.