MATLAB: Do I receive an error when trying to import the MATLAB Engine module in Python on Mac OS X 10.11

capitancpythonelengineMATLABmatlab enginepackagepython

Why do I receive an error when trying to import the MATLAB Engine module in Python on Mac OS X 10.11? I am using MATLAB R2015b.
 
>>> import matlab.engine
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/matlab/engine/__init__.py", line 59, in <module>
raise EnvironmentError('The installation of MATLAB Engine for Python is '
EnvironmentError: The installation of MATLAB Engine for Python is corrupted. Please reinstall it or contact MathWorks Technical Support for assistance.

Best Answer

The Mac OS X 10.11 El Capitan operating system by default comes with CPython version 2.7.10. MATLAB R2015b displays an error when you try to import the matlab.engine package.
The OS provided Python is not compatible with MATLAB R2015b.
Solution:
Download CPython version 2.7.12 from the python.org website, https://www.python.org/downloads.
or
Upgrade to MATLAB R2016a or newer.