arokem / python-matlab-bridge

A simple Python => MATLAB(R) interface and a matlab_magic for ipython
BSD 2-Clause "Simplified" License
332 stars 97 forks source link

Errors with Pymatbridge #252

Open amine-aboufirass opened 7 years ago

amine-aboufirass commented 7 years ago

Hello.

I am using Spyder with Python 3.5. I would like to be able to work with the pymatbridge package to control Matlab from Python. The installation was relatively smooth with a couple of attempts of the following lines in the Anaconda prompt:

conda install -c conda-forge pymatbridge=0.5.2

The only hiccup was that I had to downgrade Python from 3.6 to 3.5. I believe in Ipython the package is recognized but I am getting a couple of nasty errors blocking all movement from here. See below the command history:

Python 3.5.3 |Anaconda custom (64-bit)| (default, May 15 2017, 10:43:23) [MSC v.1900 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.

IPython 6.0.0 -- An enhanced Interactive Python.

from pymatbridge import Matlab
C:\Anaconda\lib\site-packages\IPython\nbformat.py:13: ShimWarning: The `IPython.nbformat` package has been deprecated since IPython 4.0. You should import from nbformat instead.
  "You should import from nbformat instead.", ShimWarning)

from pymatbridge import Matlab

mlab = Matlab()

mlab.start()
Starting MATLAB on ZMQ socket tcp://127.0.0.1:50982
Send 'exit' command to kill the server
............................................................MATLAB session timed out after 60 seconds
Traceback (most recent call last):

  File "<ipython-input-4-aa83ac19caf2>", line 1, in <module>
    mlab.start()

  File "C:\Anaconda\lib\site-packages\pymatbridge\pymatbridge.py", line 225, in start
    raise ValueError("%s failed to start" % self._program_name())

ValueError: MATLAB failed to start

What is going on here? I'm seeing several similar issues online but none of which actually solve the problem. Could anyone provide some additional guidance? Thanks

arokem commented 7 years ago

Did this issue resolve? Looks like it might have (#253)?

pitrish commented 4 years ago

@awa5114 have you been able to solve it? I have the same problem.