Effacer les filtres
Effacer les filtres

Why can't I run compiled Matlab from Python?

2 vues (au cours des 30 derniers jours)
Aaron Kahn
Aaron Kahn le 17 Fév 2016
Réponse apportée : Bo Li le 18 Fév 2016
I have a Matlab executable that I didn't write and cannot run it from Python. I have tried both of the following:
os.system('conversion.exe')
subprocess.Popen(['conversion.exe'])
I get an error telling me that it cannot find the MCR. I know that the MCR is installed and operational as I can run the executable from outside Python by double clicking.
Has anyone else experienced this? Does anyone have any suggestions?
Thanks in advance,
Aaron

Réponses (1)

Bo Li
Bo Li le 18 Fév 2016
Not sure why this could happen. You may add the location of MCR to the system PATH environment variable using os.environ['PATH'].
Also, you could try to call the compiled M function through the Python client directly:

Catégories

En savoir plus sur Call Python from MATLAB dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by