Try to install MATLAB engine API for python

199 vues (au cours des 30 derniers jours)
Yovel
Yovel le 7 Avr 2024
Commenté : Yovel le 8 Avr 2024
Hi,
i have:
Python 3.11.8
Matlab 2023b
I can't install Matlab engine to create communication between Python and Matlab
I tried many versions but nothing works.
example error I get:
RuntimeError: No compatible MATLAB installation found in Windows Registry. This release of MATLAB Engine API for Python is compatible with version 24.1. The found versions were 23.2. [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for matlabengine
Failed to build matlabengine
ERROR: Could not build wheels for matlabengine, which is required to install pyproject.toml-based projects
help? :/

Réponse acceptée

Kojiro Saito
Kojiro Saito le 7 Avr 2024
It seems that you're installing R2024a version of MATLAB Engine API.
The GitHub respository (https://github.com/mathworks/matlab-engine-for-python) has multiple branches and now R2024a is default.
You're using R2023b, so change the branch to R2023b and the URL would be the following.
Then, you can install with pip specifying the version 23.2.3 (for R2023b).
$ python -m pip install matlabengine==23.2.3
  1 commentaire
Yovel
Yovel le 8 Avr 2024
It works!
Thank you soooooo much!!!! :)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Call MATLAB from Python dans Help Center et File Exchange

Produits


Version

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by