Installing MATLAB Engine API for Python

71 views (last 30 days)
I'm going through the documentation available here to install matlab engine in python.
I did
cd "matlabroot\extern\engines\python"
after which I have to do
python install
But I am not sure what has to be done when there are multiple python versions installed. How can I specify the path to the python version / virtuen env in which I want to set up the matlab engine in the command `python install`?
Suggestions will be useful

Accepted Answer

Ameer Hamza
Ameer Hamza on 3 Nov 2020
Edited: Ameer Hamza on 3 Nov 2020
Activate the virtual environment and then run these line
cd "matlabroot\extern\engines\python"
python install
Alternatively, you can also try the following without activating the environment
cd "matlabroot\extern\engines\python"
/path/to/virtualenv/python install
but this second option can cause some issues.
Ameer Hamza
Ameer Hamza on 3 Nov 2020
Try this
eng = matlab.engine.start_matlab()

Sign in to comment.

More Answers (0)




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by