Open Rahuketu86 opened 9 years ago
I'm not sure. It does look like it's trying to do the right thing, but failing to connect with the messenger.
I have the same problem
Error using messenger
Socket creation failed.
Error in matlabserver (line 7)
messenger('init', socket_address);
I am on Windows and aware that Windows is not supported currently :)
matlabserver
tried to connect on tcp://127.0.0.1:61276
but failed really fast (below 1-2 seconds from calling mlab.start()
).
I thought I will try to dig into this - any pointers on how to proceed?
I am sorry to not be more responsive here. Offers to help -- I embrace with both hands. I think that this has to do with the parts of the code that need to be compiled (the "messenger"):
That part of the code lives here: https://github.com/arokem/python-matlab-bridge/tree/master/pymatbridge/messenger
And make.py
is the driver for compilation on different platforms. We ship the compiled mex files together with the code in that directory (organized according to platform).
I will try compiling messenger
then - but because I have never compiled anything before, this may take me some time :snail: . I saw the tips on compiling messenger
here so I hope I won't get lost. :octopus:
I had the same problem on Windows 10. The problem is that Matlab cannot find the mex file messenger.mexw64
.
It connects if you copy the mex file from pymatbridge\messenger\mexw64
to pymatbridge\matlab
in your Python package folder.
I have the same error on Windows 7 x64, but with a bit more information:
??? Undefined function or method 'messenger' for input arguments of type 'char'.
The rest of my error message is the same as above. So indeed, there's a problem with the "messenger".
And indeed, as @quic0 suggested, copying messenger.mex
and messenger.mex64
(I copied both just to make sure) allowed the bridge to connect to Matlab! Thank you @quic0 !
We should do something so that the messenger gets installed into that folder, I guess. Thanks for reporting.
When doing the following:
I'm still getting the following matlab pop up:
Error using messenger Socket creation failed.
Error in matlabserver (line 7) messenger('init', socket_address);
I'm using anaconda on a windows 7 and have installed pymatbridge. I also tried copying and pasting the mex file from pymatbridge\messenger\mex64 to pymatbridge\matlab but this didn't make a difference (the file was also already there). Any suggestions?
Sorry - I don't have access to a Windows machine, so I am limited in supporting work on that platform (and tbh, quite limited in supporting other platforms as well, just because this is not exactly a top priority for me at the moment). You might have better luck installing from source from this repository.
@shayqn you are not supposed to copy paste the .mex file;
From mexw64 folder, you are supposed to copy paste the 'messenger' file
@shayqn What I did was put the messenger and messenger.mex64 in the pymatbridge matlab folder, and I put them in the directory where my code was (say my ipynb file), and it worked!
I have Anaconda Python distribution installed on windows 10 64 bit. I installeed Zeromq, pymatbridge using pip.
While running following commands I get the error matlab failed to start :-
A matlab server pops up saying
To get started, type one of these: helpwin, helpdesk, or demo. For product information, visit www.mathworks.com.
Error using messenger Socket creation failed.
Error in matlabserver (line 7) messenger('init', socket_address);
»
Please advice how to resolve this.