Doesn't the script give any output - error messages, warnings? The exit code alone is not very descriptive. My guess is that the script tries to access files specified by a relative path (which works if you run the script from
, but fails if you start it from a different working directory), or it tries to use modules that are not in
.