3

I have the following environment:

  • Windows 10
  • Python 3.8.10
  • MATLAB R2020b

I'm trying to install matlabengine (pip install matlabengine) package, and I'm getting the following error:

RuntimeError: No compatible MATLAB installation found in Windows Registry. This release of MATLAB Engine API for Python is compatible with version 9.13. The found versions were 9.9

  1. What am I missing ? (according to https://pypi.org/project/matlabengine/) it seems I'm using the right versions.
  2. How can I check the versions I have (9.9 or 9.13 because as I wrote above I have MATLAB R2020b and Python 3.8.10).
wovano
  • 4,543
  • 5
  • 22
  • 49
user3668129
  • 4,318
  • 6
  • 45
  • 87

3 Answers3

3

The error is about the MATLAB version, not the version of matlabengine (the Python module).

You wrote that you have MATLAB 2020b. That is the release name for MATLAB version 9.9, as can be seen in this table on Wikipedia.

As can be read on the description of matlabengine 9.13.1, this engine version requires MATLAB release R2022b (= 9.13).

To use matlabengine with MATLAB 2020b, install version 9.9.1:

python -m pip install matlabengine==9.9.1
wovano
  • 4,543
  • 5
  • 22
  • 49
1

You need to try all versions of MATLAB engine starting from the latest one going backwards. What worked for me on Ubuntu was

$ python -m pip install matlabengine==9.12.17

NB: To get a list of all the possible versions, try install one that doesn't exist e.g.

$ python -m pip install matlabengine==9.9.2

and it will give you an error with the list of possible versions.

Tommy Wolfheart
  • 440
  • 4
  • 16
-1

You can try to install specific version of matlabengine.

pip install matlabengine==9.13.1

If they cannot find your version, you might need to update pip.

Also, you can check your current matlabengine version.

pip show matlabengine

zerg468
  • 104
  • 3
  • I have tried to install with (==9.13.1) and got same results. Maybe it because it wrote the error: "No compatible MATLAB installation found in Windows Regitry." ... ? – user3668129 Oct 06 '22 at 12:03