title: Illegal Instruction (core dumped) with Tensorflow 1.5
body: <p>I have a python script for running a tensorflow model, and I need to run this script from a PHP file (for complicated reasons) using the PHP <code>shell_exec</code> function.  When I run the python file with the following code:</p>
  
  <pre><code>$command = 'cd testModels/crosswalkPredict &amp;&amp; . activate keras &amp;&amp; python test_script.py';
  $output = shell_exec($command);
  </code></pre>
  
  <p>I get the following error: <code>Illegal instruction (core dumped)</code></p>
  
  <p>I read that the issue typcally occurs when the CPU doesn't support instructions that are present in newer versions of Tensorflow. So I downgraded to Tensorflow 1.5.</p>
  
  <p>However, this error does not occur when I run <code>cd testModels/crosswalkPredict &amp;&amp; . activate keras &amp;&amp; python test_script.py</code> directly from the terminal; it only occurs when I run it from within the PHP <code>shell_exec</code> function.  </p>
  
  <p>I have gone as far as to try the python script with only the following lines:</p>
  
  <pre><code>import tensorflow
  print('Hello!')
  </code></pre>
  
  <p>It still gives the same error, so I know the issue occurs  when all I'm doing is importing tensorflow and running the script with <code>shell_exec</code>.</p>
  
  <p>What could be the problem?</p>