Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Install a MATLAB Compiler SDK Python Package

With the Generated Installer

The Library Compiler app generates an installer that installs the MATLAB® Runtime and the files required to install the generated Python® package. The app places the installer in the for_redistribution folder.

  1. Copy the installer from the for_redistribution folder to the desired location.

  2. Run the installer.

  3. Note where the installer writes the Python package files.

  4. When the installer finishes, open a command terminal in the folder containing the Python package files.

  5. Run the Python setup script. To install to a location other than the default, consult "Installing Python Modules" in the official Python documentation.

    python setup.py install
  6. Set the required environment variables.

    On Linux®:

    setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:mcrroot/runtime/glnxa64:
           mcrroot/bin/glnxa64:mcrroot/sys/os/glnxa64:
           mcrroot/sys/opengl/lib/glnxa64
    setenv XAPPLRESDIR mcrroot/v90/X11/app-defaults

    On OS X:

    setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:mcrroot/runtime/maci64:
           mcrroot/sys/os/maci64:mcrroot/bin/maci64

    Note

    If LD_LIBRARY_PATH is not defined on Linux, remove ${LD_LIBRARY_PATH}: from the code to set the environment variables. Similarly, on OS X, remove ${DYLD_LIBRARY_PATH}: if DYLD_LIBRARY_PATH is not defined.

    Note

    mcrroot is the full path to the MATLAB Runtime installation.

    Note

    A command must be entered as a single line without white space between path components. Commands are wrapped here for readability.

Without the Generated Installer

If you already have the MATLAB Runtime installed, you can install the Python package.

  1. Copy the contents of the for_redistribution_files_only folder to the desired location.

  2. Open a command terminal in the folder containing the Python package files.

  3. Run the Python setup script. To install to a location other than the default, consult "Installing Python Modules" in the official Python documentation.

    python setup.py install
  4. Set the required environment variables.

    On Linux:

    setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH:mcrroot/runtime/glnxa64:
           mcrroot/bin/glnxa64:mcrroot/sys/os/glnxa64:
           mcrroot/sys/opengl/lib/glnxa64
    setenv XAPPLRESDIR mcrroot/v90/X11/app-defaults

    On OS X:

    setenv DYLD_LIBRARY_PATH $DYLD_LIBRARY_PATH:mcrroot/runtime/maci64:
           mcrroot/sys/os/maci64:mcrroot/bin/maci64

    Note

    mcrroot is the full path to the MATLAB Runtime installation.

    Note

    A command must be entered as a single line without white space between path components. Commands are wrapped here for readability.

Related Topics

Was this topic helpful?