mathworks / matlab-engine-for-python

Other
69 stars 9 forks source link

Support non-default MATLAB installations via MATLAB_HOME envvar #32

Open zebrapurring opened 1 year ago

zebrapurring commented 1 year ago

The documentation mentions that it is possible to use MATLAB from a non-standard location:

When MATLAB is not installed in the default location, the bin/architecture directory within the MATLAB root directory must be added to an environment variable. The path can be added to the environment variable within the shell startup configuration file (for example, .bashrc for bash shell or .tcshrc for tcsh).

However, the user has no way to tell the package where this installation is located.

This change adds support for reading environment variable MATLAB_HOME to be able to specify the directory containing the application, and defaults to /Applications on macOS and /usr/local on Linux when the variable is not defined.