title: Calling Python from MATLAB with system(): issue importing non-standard Python libraries
body: <p>test1.py contains:</p>
  
  <pre><code>import sys
  print 'ok'
  </code></pre>
  
  <p>test2.py contains:</p>
  
  <pre><code>import sys
  import numpy as np
  print 'ok'
  </code></pre>
  
  <p>Both <code>python test1.py</code> and <code>python test2.py</code> work fine.</p>
  
  <p>When I'm in MATLAB, <code>system('python test1.py')</code> works while <code>system('python test2.py')</code>  doesn't work and throw the following error message:</p>
  
  <pre><code>&gt;&gt; system('python test2.py')
  Traceback (most recent call last):
    File "test.py", line 3, in &lt;module&gt;
      import numpy as np
    File "/usr/lib/python2.7/dist-packages/numpy/__init__.py", line 137, in &lt;module&gt;
      import add_newdocs
    File "/usr/lib/python2.7/dist-packages/numpy/add_newdocs.py", line 9, in &lt;module&gt;
      from numpy.lib import add_newdoc
    File "/usr/lib/python2.7/dist-packages/numpy/lib/__init__.py", line 13, in &lt;module&gt;
      from polynomial import *
    File "/usr/lib/python2.7/dist-packages/numpy/lib/polynomial.py", line 17, in &lt;module&gt;
      from numpy.linalg import eigvals, lstsq
    File "/usr/lib/python2.7/dist-packages/numpy/linalg/__init__.py", line 48, in &lt;module&gt;
      from linalg import *
    File "/usr/lib/python2.7/dist-packages/numpy/linalg/linalg.py", line 23, in &lt;module&gt;
      from numpy.linalg import lapack_lite
  ImportError: /afs/csail.mit.edu/system/common/matlab/2012a/sys/os/glnxa64/libgfortran.so.3: version `GFORTRAN_1.4' not found (required by /usr/lib/liblapack.so.3gf)
  </code></pre>
  
  <p>Full stack:</p>
  
  <p><img src="https://i.stack.imgur.com/JOfPk.png" alt="enter image description here"></p>
  
  <p>I use Matlab 2012a x64 on Ubuntu 12.04 with Python 2.7. Any idea why Python called from MATLAB fails to import non-standard Python libraries (here Numpy, but I had the same issue with Scipy)? Note that everything works fine on my Windows computer.</p>