So I have a php script in which I send the required data from app and then in php script, that data is passed as command line arguments to a python script. The issue is when I run python script from the terminal, It runs successfully but when I use postman to run the PHP script, the python script doesn't run.
This is the line where I am calling the py script, when I run the same from terminal, it produces the output but when I run it like this and dump $output, I get the error $output = shell_exec("python3 final.py $day $month $year $hour 2>&1");
ModuleNotFoundError: No module named 'sklearn'
However sklearn is Installed already, and its working via terminal.
Kindly suggest what should I do regarding this issue ?