KM and Python

There may be an issue with the environment used and the modules/packages your script tries to use.

As @ccstone suggested in another thread, use his macro to
Check your actual $PATH differences between the Terminal and KM