MAC os not loading the modules of python in jenkins, how to fix that?

When I ran the python scripts directly, it is able to detect modules of python.
But when I ran with jenkins, even the default OS module is not being detected.

Any suggestions on how to fix that?