I currently have python 2.7 installed as part of OSX, and recently installed 3.5.2.
I'm running a local webserver on my mac using XAMPP, and when I execute the python script from within apache, it loads fine:
$executePython = "python " . __DIR__ . "/cycle/cutoff.py $device_id $processPreviousMinutes";
exec("$executePython");
However, when I replace python with python3 my script refuses to run. I can invoke it manually from the command line using both versions, however it seems like the apache account/daemon doesn't have access to python3. Would this be something to do with a configuration file that I've overlooked?
$executePythoncommand with>>/tmp/errorlog.log 2>&1and receivedsh: python3: command not foundwhen apache is running as daemon user. When I hardcode the path to/usr/local/bin/python3it runs! However, I'd like to specify justpython3, so how does one do this?echo $PATHI get:/usr/local/bin /usr/bin /bin /usr/sbin /sbin /usr/local/git/binso my own account can just run python3 from anywhere, but the apache daemon account can't (but it can run python).