Reputation: 237
I am trying to use pymatbridge. I am using python 2.7.9 64 bits on Windows and Canopy 1.5.5 and when I put the following code in ipython notebook
from pymatbridge import Matlab
mlab = Matlab(executable='matlab')
mlab.start()
I receive this error:
ZMQError Traceback (most recent call last) in ()
1 from pymatbridge import Matlab
2 mlab = Matlab(executable='matlab')
----> 3 mlab.start()
C:\Users\Administrateur\AppData\Local\Enthought\Canopy\User\lib\site-packages\pymatbridge\pymatbridge.pyc in start(self) 205 port = self.socket.bind_to_random_port(self.socket_addr) 206 self.socket_addr = self.socket_addr + ":%s"%port --> 207 self.socket.unbind(self.socket_addr) 208 209 # Start the MATLAB server in a new process
C:\Users\Utilisateur\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\zmq\backend\cython\socket.pyd in zmq.backend.cython.socket.Socket.unbind (zmq\backend\cython\socket.c:5247)()
ZMQError: No such file or directory
I've tried pip install pyzmq. What am I doing wrong?
Upvotes: 0
Views: 289
Reputation: 314
Under executable
you should not call matlab
but add the path to the location of your MATLAB executable. In my case (using OSX) it is:
'/Applications/MATLAB_R2014b.app/bin/matlab'
.
I found this by typing matlabroot
in the MATLAB Command Window (returns /Applications/MATLAB_R2014b.app
) and adding /bin/matlab
.
In some cases just mlab = Matlab()
works, see my earlier error running pymatbridge on a cluster and the pymatbridge github page.
Upvotes: 1