title: Problems installing "MATLAB Engine for Python" with Anaconda
body: <p>I am using Python 3.4.3 | Anaconda 2.3.0 (x86_64) on OS X 10.10.5 and following <a href="http://www.mathworks.com/help/matlab/matlab_external/install-the-matlab-engine-for-python.html" rel="noreferrer">these instructions to install MATLAB Engine for Python</a>. Installation seems to succeed, but upon launching python &amp; attempting to import, I see the following:</p>
  
  <pre><code>Python 3.4.3 |Anaconda 2.3.0 (x86_64)| (default, Oct 20 2015, 14:27:51) 
  [GCC 4.2.1 (Apple Inc. build 5577)] on darwin
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt; import matlab.engine
  Traceback (most recent call last):
    File "/Users/tyler/.local/lib/python3.4/site-packages/matlab/engine/__init__.py", line 42, in &lt;module&gt;
      pythonengine = importlib.import_module("matlabengineforpython"+_PYTHONVERSION)
    File "/Users/tyler/anaconda/lib/python3.4/importlib/__init__.py", line 109, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "&lt;frozen importlib._bootstrap&gt;", line 2254, in _gcd_import
    File "&lt;frozen importlib._bootstrap&gt;", line 2237, in _find_and_load
    File "&lt;frozen importlib._bootstrap&gt;", line 2224, in _find_and_load_unlocked
  ImportError: No module named 'matlabengineforpython3_4'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/Users/tyler/.local/lib/python3.4/site-packages/matlab/engine/__init__.py", line 58, in &lt;module&gt;
      pythonengine = importlib.import_module("matlabengineforpython"+_PYTHONVERSION)
    File "/Users/tyler/anaconda/lib/python3.4/importlib/__init__.py", line 109, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "&lt;frozen importlib._bootstrap&gt;", line 2254, in _gcd_import
    File "&lt;frozen importlib._bootstrap&gt;", line 2237, in _find_and_load
    File "&lt;frozen importlib._bootstrap&gt;", line 2226, in _find_and_load_unlocked
    File "&lt;frozen importlib._bootstrap&gt;", line 1191, in _load_unlocked
    File "&lt;frozen importlib._bootstrap&gt;", line 1161, in _load_backward_compatible
    File "&lt;frozen importlib._bootstrap&gt;", line 539, in _check_name_wrapper
    File "&lt;frozen importlib._bootstrap&gt;", line 1715, in load_module
    File "&lt;frozen importlib._bootstrap&gt;", line 321, in _call_with_frames_removed
  ImportError: dlopen(/Applications/MATLAB_R2015b.app/extern/engines/python/dist/matlab/engine/maci64/matlabengineforpython3_4.so, 2):     Library not loaded: @rpath/libpython3.4m.dylib    
    Referenced from: /Applications/MATLAB_R2015b    .app/extern/engines/python/dist/matlab/engine/maci64/matlabengineforpython3_4.so    
    Reason: image not found    
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/Users/tyler/.local/lib/python3.4/site-packages/matlab/engine/__init__.py", line 60, in &lt;module&gt;
      raise EnvironmentError('The installation of MATLAB Engine for Python is '
  OSError: The installation of MATLAB Engine for Python is corrupted.  Please reinstall it or contact MathWorks Technical Support for assistance.
  </code></pre>
  
  <p>While researching this issue, I found <a href="http://www.mathworks.com/matlabcentral/answers/195474-corrupted-installation-of-matlab-engine-for-python" rel="noreferrer">several</a> <a href="http://www.mathworks.com/matlabcentral/answers/171329-ipython-error-using-matlab-engine" rel="noreferrer">other</a> <a href="http://www.mathworks.com/matlabcentral/answers/203592-matlab-engine-for-python-segfaults-in-matlab-engine-start_matlab-matlab-r2014b-os-x" rel="noreferrer">references</a> to this exact issue on MathWorks' website, all without a resolution. The final link suggests the problem may be with <a href="http://www.mathworks.com/matlabcentral/answers/180518-why-does-matlab-engine-for-python-crash-when-using-a-non-system-default-version-of-python-on-mac" rel="noreferrer">dynamic linking</a>.</p>
  
  <p>Given how many scientific toolboxes are only available in MATLAB, it would be of great use to be able to call this engine using Anaconda. While there are other packages available that support this functionality, they invariably have limitations or other complexity like a client-server architecture.</p>
  
  <p>Any suggestions are most welcome.</p>