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.

System Requirements for MATLAB Engine API for Python

You can use the MATLAB® Engine API for Python® on any platform that MATLAB supports.

Python Version Support

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:

  • version 2.7

  • version 3.4

  • version 3.5

  • version 3.6

To download and install Python, see Install Supported Python Implementation.

Note

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 python -V at your operating system prompt to display the Python version number.

For help on the Python language, see www.python.org/doc in the python.org documentation. For help on third-party or user-defined modules, refer to the product documentation.

Download 64-Bit Versions of Python and MATLAB

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.)

Requirements for Building Python from Source

To enable wide-unicode support for Python 2.7 on Linux®, configure the build with the --enable-unicode=ucs4 option. This configure option is not needed when you build any version of Python on Mac systems, or Python 3.x on Linux.

Related Topics

External Websites

Was this topic helpful?