I am trying to run a Python Script for Image Detection Via a php page and to catch and display the output generated by py script.
Here is my python script GITHUB LINK
I am running the python script using this code :
$command = escapeshellcmd('sudo python Main.py');
$output = shell_exec($command);
echo $output;
This is producing this error :
Traceback (most recent call last):
File "Main.py", line 3, in <module>
import cv2
ImportError: No module named cv2
****But the same script works fine when executed independently with terminal. I have used anaconda for installation of Opencv****
Thanks in advance :)