Installing MATLAB Engine API for Python
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Deepa Maheshvare
le 3 Nov 2020
Commenté : Ameer Hamza
le 3 Nov 2020
Hi,
I'm going through the documentation available here https://in.mathworks.com/help/matlab/matlab_external/install-the-matlab-engine-for-python.html to install matlab engine in python.
I did
cd "matlabroot\extern\engines\python"
after which I have to do
python setup.py 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 setup.py install`?
Suggestions will be useful
0 commentaires
Réponse acceptée
Ameer Hamza
le 3 Nov 2020
Modifié(e) : Ameer Hamza
le 3 Nov 2020
Activate the virtual environment and then run these line
cd "matlabroot\extern\engines\python"
python setup.py install
Alternatively, you can also try the following without activating the environment
cd "matlabroot\extern\engines\python"
/path/to/virtualenv/python setup.py install
but this second option can cause some issues.
2 commentaires
Ameer Hamza
le 3 Nov 2020
Try this
eng = matlab.engine.start_matlab()
eng.main(nargout=0)
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Introduction to Installation and Licensing dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!