diff --git a/README.md b/README.md index 131b11d..b615fb5 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ The MATLAB® Engine API for Python® provides a package to integrate MATLA ## Requirements ### Required MathWorks Products -* MATLAB release R2021a +* MATLAB release R2020b ### Required 3rd Party Products -* Python 3.7 or 3.8 +* Python 3.6, 3.7, or 3.8 * Supported Python versions by MATLAB release can be found [here](https://www.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/sysreq/files/python-compatibility.pdf). --- @@ -21,7 +21,7 @@ The MATLAB® Engine API for Python® provides a package to integrate MATLA MATLAB Engine API for Python can be installed directly from the Python Package Index. ```bash -$ python -m pip install matlabengine==9.10.1a1 +$ python -m pip install matlabengine==9.9.1a0 ``` @@ -29,7 +29,7 @@ $ python -m pip install matlabengine==9.10.1a1 ### Linux® Prior to installation, check the default install location of MATLAB by calling ```matlabroot``` in a MATLAB Command Window. By default, Linux installs MATLAB at:
-```/usr/local/MATLAB/R2021a``` +```/usr/local/MATLAB/R2020b``` 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). @@ -46,14 +46,14 @@ setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:matlabroot/bin/glnxa64 MATLAB Engine API for Python can be installed directly from the Python Package Index. ```bash -$ python -m pip install matlabengine==9.10.1a1 +$ python -m pip install matlabengine==9.9.1a0 ``` ### macOS Prior to installation, check the default install location of MATLAB by calling ```matlabroot``` in a MATLAB Command Window. By default, macOS installs MATLAB at:
-```/Applications/MATLAB_R2021a.app``` +```/Applications/MATLAB_R2020b.app``` 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). @@ -70,7 +70,7 @@ setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:matlabroot/bin/maci64 MATLAB Engine API for Python can be installed directly from the Python Package Index. ```bash -$ python -m pip install matlabengine==9.10.1a1 +$ python -m pip install matlabengine==9.9.1a0 ``` --- diff --git a/setup.py b/setup.py index da518a7..7e68708 100644 --- a/setup.py +++ b/setup.py @@ -21,13 +21,13 @@ class _MatlabFinder(build_py): } # MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string) - MATLAB_REL = 'R2021a' + MATLAB_REL = 'R2020b' # MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string) - MATLAB_VER = '9.10.1a1' + MATLAB_VER = '9.9.1a0' # MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string) - SUPPORTED_PYTHON_VERSIONS = set(['3.7', '3.8']) + SUPPORTED_PYTHON_VERSIONS = set(['3.6', '3.7', '3.8']) # MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string) VER_TO_REL = { @@ -303,7 +303,7 @@ def run(self): setup( name="matlabengine", # MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string) - version="9.10.1a1", + version="9.9.1a0", description='A module to call MATLAB from Python', author='MathWorks', license="MathWorks XSLA License", @@ -328,9 +328,10 @@ def run(self): "Natural Language :: English", "Intended Audience :: Developers", # MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string) + "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8" ], # MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string) - python_requires=">=3.7, <3.9" + python_requires=">=3.6, <3.9" ) diff --git a/src/matlab/engine/__init__.py b/src/matlab/engine/__init__.py index 38a1dfa..3d0e221 100644 --- a/src/matlab/engine/__init__.py +++ b/src/matlab/engine/__init__.py @@ -28,7 +28,7 @@ # UPDATE_IF_PYTHON_VERSION_ADDED_OR_REMOVED : search for this string in codebase # when support for a Python version must be added or removed -_supported_versions = ['2_7', '3_7', '3_8'] +_supported_versions = ['3_6', '3_7', '3_8'] _ver = sys.version_info _version = '{0}_{1}'.format(_ver[0], _ver[1]) _PYTHONVERSION = None @@ -39,7 +39,7 @@ raise EnvironmentError("Python %s is not supported." % _version) _module_folder = os.path.dirname(os.path.realpath(__file__)) -_arch_filename = os.path.join(_module_folder, "_arch.txt") +_arch_filename = _module_folder+os.sep+"_arch.txt" try: pythonengine = importlib.import_module("matlabengineforpython"+_PYTHONVERSION) @@ -47,16 +47,15 @@ try: _arch_file = open(_arch_filename,'r') _lines = _arch_file.readlines() - [_arch, _bin_dir,_engine_dir, _extern_bin_dir] = [x.rstrip() for x in _lines if x.rstrip() != ""] + [_arch, _bin_dir,_engine_dir] = [x.rstrip() for x in _lines if x.rstrip() != ""] _arch_file.close() sys.path.insert(0,_engine_dir) - sys.path.insert(0,_extern_bin_dir) _envs = {'win32': 'PATH', 'win64': 'PATH'} if _arch in _envs: if _envs[_arch] in os.environ: _env = os.environ[_envs[_arch]] - os.environ[_envs[_arch]] = _bin_dir + os.pathsep + os.environ[_envs[_arch]] + os.environ[_envs[_arch]] = _bin_dir+os.pathsep+os.environ[_envs[_arch]] else: os.environ[_envs[_arch]] = _bin_dir if sys.version_info.major >= 3 and sys.version_info.minor >= 8: