Install Support Packages Programmatically
Many MATLAB® and Simulink® products use support packages to interact with hardware or provide additional
processing capabilities. This procedure shows how to install support packages
programmatically using MATLAB Package Manager (mpm
). To install support packages
interactively instead, use the Add-Ons panel in MATLAB. For more details, see Get and Manage Add-Ons (MATLAB).
Get MATLAB Package Manager
MATLAB Package Manager (mpm
) is a command-line tool for
installing products and support packages from the operating system command line. To get
the latest version of mpm
for your platform, follow the instructions
in Get MATLAB Package Manager.
Configure Installation Using Input File
Get the mpm
input file for your MATLAB release and use it to configure your support package installation.
From the mpm-input-files
folder on GitHub®, open the folder of the MATLAB release for which you want to install support packages, and download a
copy of the mpm_input_<release>.txt
file.
In this input file, configure your support package installation by uncommenting lines
that start with a single #
and updating their values.
Release Update Level (Optional)
By default,
mpm
installs the latest versions of MATLAB support packages for the given release.To install a specific release update, uncomment the
updateLevel
line and change the update level. For example:updateLevel=0
installs the general release.updateLevel=1
installs update 1.
MATLAB Installation Folder (Optional)
In the
destinationFolder
line, specify the root folder of the MATLAB installation. If you do not specifydestinationFolder
, thenmpm
sets the default destination folder for that computer's platform. If MATLAB is not installed already, thenmpm
installs MATLAB to the folder you specify in thedestinationFolder
line.To specify the MATLAB installation folder, uncomment the
destinationFolder
line and specify the path to the folder.Linux® or Mac example:
destinationFolder=/home/<USER>/matlab
Windows® example:
destinationFolder="C:\Users\<USER>\matlab"
Note
You cannot use
destinationFolder
to set the support package installation folder.mpm
automatically derives this folder from the product installation folder specified bydestinationFolder
. To change the support package installation folder, install MATLAB and then run the functionmatlabshared.supportpkg.setSupportPackageRoot
(MATLAB).Support Packages
Uncomment the support packages you want to install. For example, this code configures
mpm
to install two support packages. The required products, MATLAB and Deep Learning Toolbox™, are also included in the installation.product.Deep_Learning_Toolbox_Model_for_ResNet-50_Network # ... product.Deep_Learning_Toolbox_Model_for_VGG-16_Network
Save the file.
Install Support Packages
Install the support packages using mpm install
. Specify the full
path to the input file you downloaded and updated.
Linux or Mac:
./mpm install --inputfile=/path/to/file/mpm_input_<release>.txt
Windows (run as administrator):
.\mpm.exe install --inputfile="\path\to\file\mpm_input_<release>.txt"
mpm
also installs the required products, MATLAB and Deep Learning Toolbox in this example, if they are not installed already.
See Also
Topics
- Install Products Programmatically
- Get MATLAB Package Manager
- Install Support Packages on Offline Computer