Panorama normally uses the version of Python that is in
If you want to use a version of Python that is installed in a different location, use this code:
pythonPrefixLineTemplate = "#!/some/where/else/python"
FYI, the source code for the PYTHON statement is viewable (and even editable). In Panorama 6 that is done with the Custom Statements wizard, PYTHON is in _ScriptLib.
Additional note: None of this has anything to do with what shell is being used. DIfferent shells could have different search path’s for finding shell commands, but since Panorama is explicitly specifying the exact path to use, the search path preference doesn’t matter. It could matter if you were manually invoking a command from Terminal.app.