This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Integrate a Python Package

To integrate a MATLAB® Compiler SDK™ Python® Package:

  1. Install the compiled Python Package.

    See Install a MATLAB Compiler SDK Python Package.

  2. In consultation with the MATLAB programmer, collect the MATLAB function signatures that comprise the services in the application.

  3. Install the Python engine. See Install MATLAB Engine API for Python (MATLAB).

  4. Import the compiled Python package.

    See Import Compiled Python Packages.

  5. Write the Python code to initialize the MATLAB Runtime, and load the MATLAB code.

    See Initialize the MATLAB Runtime.

  6. Create the required MATLAB data for function inputs and outputs.

    See MATLAB Arrays as Python Variables.

  7. Invoke the MATLAB functions.

    See Invoke a Compiled MATLAB Function or Invoke a Compiled MATLAB Function Asynchronously.

  8. Terminate each package using its terminate() function. If you do not call this function explicitly, it is called automatically when the program exits.