Why can't I run compiled Matlab from Python?
2 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
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:
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Call Python from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!