There isn't much anyone can say without seeing some of your code. How do you call the script and where is it located?
If you're using something like
ofSystem(), try using the complete path to pythonsomething like
You can see the complete path to Python by typing
which python into the terminal.