title: process failed exception when running Python via laravel
body: <p>I'm trying to run python script via laravel using symfony process but when i run it I get this error:
  'Python' is not recognized as an internal or external command, operable program or batch file.
  I tried to run the python script with cmd and it run and return the result</p>
  
  <p>my laravel code is this:</p>
  
  <p>`</p>
  
  <pre><code>$text="I luv my &amp;lt;3 iphone &amp;amp; you're awsm apple. DisplayIsAwesome, sooo happppppy  http://www.apple.com";
  $process=new Process("Python C:\Users\Bcc\PycharmProjects\twitter-data\Car.py \"{$text}\"");
  $process-&gt;run();
  if (!$process-&gt;isSuccessful()){
              throw new ProcessFailedException($process);
  }
  var_dump($process-&gt;getOutput());
  die();
  </code></pre>
  
  <p>`
  I run this command on cmd:
  Python C:\Users\Bcc\PycharmProjects\twitter-data\Car.py "I luv my &lt;3 iphone &amp; you're awsm apple. DisplayIsAwesome, sooo happppppy  <a href="http://www.apple.com" rel="nofollow noreferrer">http://www.apple.com</a>"</p>
  
  <p>EDIT: Problem Solved.I move python script to controllers folder and use shell_exec ,so just replace that code with this</p>
  
  <pre><code>    $text="I luv my &amp;lt;3 iphone &amp;amp; you're awsm apple. DisplayIsAwesome, sooo happppppy  http://www.apple.com";
      $result = shell_exec("python ". app_path()."\Http\Controllers\Car.py " . escapeshellarg($text));
  
      var_dump($result);
      die();
  </code></pre>