Using python to generate score

Hello, I have tried following the instructions in “Csound A Sound and Music Computing System” and the examples given in the Floss Manual to use python to generate a score for my csd file but I am unable figure out how this is supposed to work. I have tried both the method of adding the to the section -L " | python3", being the name of my python script, but this method does not work. I have also tried within the score to add and adding something similar to what is written in “Csound A Sound and Music Computing System” in Listing 8.9 but this method all throws an error. What might I be doing wrong?

can you post your error?

I’d be very interested to follow this problem as I too have trouble with creating scores with Python.