Cannot import certain python modules

Martin
you are trying to run python code from a shell/bash script.
type #!/usr/bin/python at the top of your script. Otherwise KM will think is a regular bash script