-1

I am trying to call a Python function from MATLAB, and I'm getting a permission denied error.

function [success] = run python()
%system('sudo easy_install requests');
%system('sudo easy_install PyCrypto');
system('/Users/mmk/Desktop/Folder/run.py')

success = 1;

end

The error is:

/bin/bash: /Users/mmk/Desktop/Folder/run.py: Permission denied

ans =

    1 

Not sure what I should be doing in this case. Any ideas?

0

1 Answer 1

0

figured it out.

it needs to be system('python /Users/mmk/Desktop/Folder/run.py')

Sign up to request clarification or add additional context in comments.

1 Comment

Alternatively, if your python file is executable (google chmod), and you make the first line of the file #!/usr/bin/env python your previous approach should have worked, too.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.