title: Jupyter notebook matlab kernel on remote machine
body: <p>I would like to package some of my MATLAB code in a Jupyter notebook, which I understand I can do using pymatbridge and the matlab_kernel for jupyter.</p>
  
  <p>However, I don't have MATLAB on my local machine. I use ssh to connect to a remote machine and run MATLAB there.</p>
  
  <p>I am able to start a Jupyter notebook after I ssh to the remote machine and I can see the option to start a MATLAB notebook. When I start it however I get a long list of errors in the terminal and the notebook does not respond when I try to run code. Can someone correct the procedure I have used to setup the MATLAB kernel for Jupyter?</p>
  
  <p>I have anaconda 4.1.1 on my machine. This is the procedure I have used to setup the matlab kernel:</p>
  
  <pre><code>pip install pymatbridge
  pip install matlab_kernel
  python -m matlab_kernel install --user
  </code></pre>
  
  <p>As suggested here (<a href="https://anneurai.net/2015/11/12/matlab-based-ipython-notebooks/" rel="nofollow noreferrer">https://anneurai.net/2015/11/12/matlab-based-ipython-notebooks/</a>) I add the following to my .bash_profile to point the matlab kernel to matlab:</p>
  
  <pre><code>export MATLAB_EXECUTABLE=/opt/matlab-R2014a/bin/matlab
  </code></pre>
  
  <p>This is the path I get when I run 'which matlab' after I ssh to the remote machine.</p>
  
  <p>This is the error I get in the terminal when I start a MATLAB notebook:</p>
  
  <pre><code>/home/s0822514/anaconda3/lib/python3.5/site-packages/IPython/nbformat.py:13: ShimWarning: The `IPython.nbformat` package has been deprecated. You should import from nbformat instead.
  "You should import from nbformat instead.", ShimWarning)
  Invalid MEX-file
  '/home/s0822514/anaconda3/lib/python3.5/site-packages/pymatbridge/matlab/messenger.mexa64':
  /lib64/libc.so.6: version `GLIBC_2.17' not found (required by
   /home/s0822514/anaconda3/lib/python3.5/site-packages/pymatbridge/matlab/messenger.mexa64)
  
  Error in matlabserver (line 7)
  messenger('init', socket_address);
  
  [W 11:27:38.899 NotebookApp] Timeout waiting for kernel_info reply from c8b74e6f-21f8-477a-bde7-5f10ff141089
  Traceback (most recent call last):
  
  [I've removed all the traceback info here because it is quite long, please comment if this is important]
  
  ValueError: MATLAB failed to start
  </code></pre>
  
  <p>My guess is that the matlab_kernel is not installed correctly since when I first installed it there was an error requiring me to use sudo or add --user. Alternatively I think there is something wrong with how I am pointing the matlab_kernel to MATLAB in my bash profile.</p>
  
  <p>My last thought is that maybe I should be doing everything, including setting up anaconda and the jupyter notebook on the remote machine (As is suggested here: <a href="https://stackoverflow.com/questions/35399059/use-jupyter-notebook-on-my-local-computer-to-run-code-on-a-remote-computer">Use Jupyter Notebook on my local computer to run code on a remote computer</a>) But I have tried doing the procedure to setup the MATLAB kernel after I ssh to the remote machine. This does not seem to make any difference. </p>