Main Content

Development Environment

  • Use the MATLAB® desktop to author MATLAB code and MATLAB Compiler SDK™ to generate Python® packages from MATLAB code.

  • Install the packages generated by MATLAB Compiler by running python install [options] on the system command line. If you have full administrator privileges and install to the default location, you do not need to specify any options. Otherwise, use --user to install to your home folder or --prefix="installdir" to install to a specific directory. If you installed to a location other than the default, add installdir to the PYTHONPATH environment variable.For more details, refer to Installing Python Modules — Python 3.7.16 documentation.

  • Use a code editor to integrate the packages with your Python application. Import the package in your Python application to call the exported MATLAB functions.

For instructions on installing and integrating Python packages, see Install and Import MATLAB Compiler SDK Python Packages.You can test your application against the installed version of MATLAB that was used to generate the Python packages or against MATLAB Runtime. However, during deployment, you must use MATLAB Runtime.

Related Topics