I am on Ubuntu16, python3.6 is installed through anaconda distribution.
I have successfully installed MySQLdb module and it works fine when called (say) from the terminal. However, when I try to execute the same python script from PHP (version 7) using
$tmp = exec("python script_name.py", $input_parameters );
I get the following error message
ImportError: No module named MySQLdb
Any ideas why this might happen? Many thanks in advance.
system("which python");