Differences Between MATLAB Engine API for Python and MATLAB Compiler SDK
MATLAB® Engine API for Python® enables you to call MATLAB as a computational engine. The main differences between MATLAB Engine API for Python and MATLAB Compiler SDK™ for Python are as follows:
MATLAB Compiler SDK for Python allows you to run compiled Python packages without needing a licensed copy of MATLAB, whereas MATLAB Engine API for Python requires MATLAB.
MATLAB Engine API for Python starts a MATLAB session out-of-process, which executes MATLAB as a separate process. MATLAB Compiler SDK for Python starts MATLAB Runtime in-process.
You can use MATLAB Engine API for Python to call built-in or user-written MATLAB functions. MATLAB Compiler SDK for Python can only call user-written MATLAB functions. To call a built-in MATLAB function using MATLAB Compiler SDK, you can create a wrapper function and include it in the package.
For an example of calling user-written MATLAB code with MATLAB Engine API for Python, see Call User Scripts and Functions from Python.
MATLAB Engine API for Python allows you to work with a workspace, while MATLAB Compiler SDK for Python does not. Therefore you cannot call MATLAB classes (handles) with MATLAB Compiler SDK for Python.
For more information on MATLAB Engine workspace, see Use MATLAB Engine Workspace in Python.