I have a PHP script, that calls a python script by
$call_python = \"python ../python/lp_3.py \".$author; $python_output = Null; $mystring = exec($call_python
$call_python = "/opt/local/bin/python2.6 ../python/lp_3.py ".$author; $python_output = Null; $mystring = exec($call_python, $output_python);
did the job. Like @AJ pointed out, I had to tell python which version to chose. I chose a version where MySQLdb was available and all was fine.