title: python import fails when called from PHP
body: <p>I'm having a puzzling problem when trying to import a module in python only when the script is called from php via system or exec.</p>
  
  <p>From the python shell:</p>
  
  <pre><code>import igraph #This works.
  </code></pre>
  
  <p>if the previous line was in a file, say, test_module.py, then:<br>
  python test_module.py in the bash works.</p>
  
  <p>Within PHP:<br>
  exec("python test_module.py",$output,$retval) -> fails : $retval = 1.</p>
  
  <p>However, if the script is instead : <code>import math</code>, then this is fine.</p>
  
  <p>Anybody ever dealt with something similar?</p>