You can use the MATLAB® Engine API for Python® on any platform that MATLAB supports.
To use the MATLAB Engine API for Python, you must have a supported version of the reference Python implementation (also known as CPython) installed on your system. The engine supports the following versions:
To download and install Python, see Install Supported Python Implementation.
For 64-bit MATLAB on Microsoft® Windows® systems, select the 64-bit Python version, called Windows x86-64 MSI installer.
To call Python from your operating system prompt, either add the full path to Python to your PATH environment variable, or include the full path when you call the Python interpreter.
To determine if you are calling a supported version, type
-V at your operating system prompt to display the Python version
For help on the Python language, see
python.org documentation. For help on third-party
or user-defined modules, refer to the product documentation.
The architecture of MATLAB must match the architecture of Python. On the Python download site, downloads for Microsoft Windows platforms are 32-bit versions by default. To download the 64-bit version, choose options with the name Windows x86-64 MSI installer.
To test whether your version of Python is 32-bit or 64-bit, type the following code at the Python prompt:
import sys print(sys.maxsize > 2**32)
This code returns
True if the Python interpreter
is 64-bit, and
False if it is 32-bit. (For more
details, see Python
2.7 Documentation — Cross Platform.)
To enable wide-unicode support for Python 2.7 on Linux®,
configure the build with the
This configure option is not needed when you build any version of Python on
Mac systems, or Python 3.x on Linux.