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 set up script.

    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:   Commands must be entered as a single line.

Without the Generated Installer

If you already have the MATLAB Runtime installed, you can just 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 set up script.

    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:   Commands must be entered as a single line.

Related Examples

Was this topic helpful?