question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
arokemcommented, May 22, 2018

Oh - I think that’s because it doesn’t follow the same API.

https://github.com/arokem/python-matlab-bridge/blob/master/pymatbridge/matlab_magic.py#L53

Could you please try the following?

pymatbridge.load_ipython_extension(ip, matlab='/Applications/MATLAB_R2018a.app/bin/matlab')
0reactions
arokemcommented, May 22, 2018

Happy it worked! We should probably change that API to be consistent.

On Tue, May 22, 2018 at 3:23 AM, Maciej Gaca notifications@github.com wrote:

Damn, it works! Cheers!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/arokem/python-matlab-bridge/issues/258#issuecomment-390940881, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHPNgipgomBjImyhO3nvHk0uo7HusGpks5t0-cVgaJpZM4UGrCx .

Read more comments on GitHub >

github_iconTop Results From Across the Web

If keyboard shortcuts don't work on Mac - Apple Support
If keyboard shortcuts don't work on Mac. Some keyboard shortcuts may be unavailable in some apps. Make sure you're using the latest version...
Read more >
Screenshot on Mac Not Working | 4 Ways and Tips in 2021
First, open the menu and then, use "Command + Shift + 4" keys at the same time ... If the above steps didn't...
Read more >
Fix Wi-Fi Problems in macOS Sierra - OSXDaily
2: Set a New Network Location with Custom MTU and DNS · Pull down the Apple menu and choose “System Preferences”, then select...
Read more >
gdb doesn't work on macos High Sierra 10.13.3 - Stack Overflow
Create certificate and close Certificate Assistant. Find certificate in System keychain. Double click the certificate; Expand Trust, set Code ...
Read more >
Mac Installation Errors You May Encounter and How to Fix Them
This message usually shows up as a sheet that drops down from the macOS or OS X installer shortly after you start the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found