- The target machine must have a supported version of Python installed.
- The installed version of Python must be discoverable by MATLAB.
- If the py. command is calling a custom Python module, than it must be on the Python search path.
Is it possible to compile MATLAB programs that contain Python code using MATLAB Compiler?
12 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2018-3-12
编辑: MathWorks Support Team
2023-11-15
I tried compiling my MATLAB program with Python code into a standalone application, but got the following error message when running it:
Undefined variable "py" or function "py.command"
采纳的回答
MathWorks Support Team
2023-11-15
编辑:MathWorks Support Team
2023-11-15
Yes, this workflow is supported.
But please pay attention to what mentioned in the link below before compiling your code:
Some possible causes for this error are:
0 个评论
更多回答(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!