Why can't I run compiled Matlab from Python?

16 ビュー (過去 30 日間)
Aaron Kahn
Aaron Kahn 2016 年 2 月 17 日
回答済み: Bo Li 2016 年 2 月 18 日
I have a Matlab executable that I didn't write and cannot run it from Python. I have tried both of the following:
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,

回答 (1 件)

Bo Li
Bo Li 2016 年 2 月 18 日
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:

Community Treasure Hunt

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

Start Hunting!

Translated by