I am executing a simple python -v from:
$process = new Process(['python -v']);
$process->run();
try {
if (!$process->isSuccessful())
{
throw new ProcessFailedException($process);
}
}
catch (\Exception $e) {
$this->logger->error($e->getMessage());
}
but I get the exception:
The command "'python -v'" failed. Exit Code: 127(Command not found) Working directory: /var/www/symfony/symfony/public Output: ================ Error Output: ================ sh: 1: exec: python -v: not found
If I run the same command from the shell all works fine.