Python3 action prompting to install developer tools with shell script variable options

Hi! I'm experiencing some behavior that I don't understand.

I maintain a relatively large set of macros for my business that run on about 22 machines.

I just noticed that on machines without the xcode developer tools installed, if i create an "Execute Shell Script" action, with the following code:

#!/usr/bin/env python3

print('Hello World')

It works as expected, ONLY if "Include All Variables" is checked.
image

Any other option results in the macro failing and me getting this prompt
image

Easy enough workaround, but can anyone explain why this is?

One thing you might consider doing, is displaying all the variables using a shell command to output/display all the environment variables before the python command. Then you could compare the variables for the case where it works with the variables for the case where it doesn’t work. This is what I would do because there is a possibility that one of the variables that it needs is missing.

Oh right. That makes total sense. I forgot that 'ENV_PATH' is just another global KM variable. And I wasn't explicitly including it, which would make sense why the action could see my python3 install!!