Thanks to visit codestin.com
Credit goes to github.com

Skip to content

OS X Sierra: Can't make the magic commands work #258

Open
@gacek91

Description

@gacek91

Hey there,

I'm pretty much out of ideas how to fix my issue.

This code works like a charm, no problems whatsoever.

from pymatbridge import Matlab
mlab = Matlab(executable='/Applications/MATLAB_R2018a.app/bin/matlab')
mlab.start()

However, I would really like to be able to use magic codes. Both codes below give me this error: ValueError: MATLAB failed to start

%load_ext pymatbridge
import pymatbridge as pymat
ip = get_ipython()
pymat.load_ipython_extension(ip)

I even tried changing MATLAB_BIN=/Applications/MATLAB_R2018a.app/bin/ in .../messenger/mexmaci/local.cfg, didn't help either.

Last but not least - I tried changing dir to .../messenger/ and running python3.6 make.py matlab. Got an error:

macbook-air:messenger Gacek$ python3.6 make.py matlab
Building messenger.mexmaci64...
/Applications/MATLAB_R2018a.app/bin/mex -O -L. -I. -lzmq ./src/messenger.c
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymatbridge/messenger/./src/messenger.c not found; check that you are in the correct current folder, and check the spelling of '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymatbridge/messenger/./src/messenger.c'.
Traceback (most recent call last):
  File "make.py", line 285, in <module>
    build_matlab(static=args.static)
  File "make.py", line 270, in build_matlab
    do_build(make_cmd, 'messenger.%s' % extension)
  File "make.py", line 178, in do_build
    subprocess.check_output(shlex.split(make_cmd), shell=use_shell)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/Applications/MATLAB_R2018a.app/bin/mex', '-O', '-L.', '-I.', '-lzmq', './src/messenger.c']' returned non-zero exit status 255.

Would be grateful for any ideas!

Regards,

Matt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions