matlabengine install error(python)

7 visualizaciones (últimos 30 días)
龍馬 青葉
龍馬 青葉 el 11 de Sept. de 2023
Respondida: Rushikesh el 20 de Sept. de 2024
I needed to call matlab from python, so I installed matlabengine in python and got the error shown in the picture. I did a lot of research and I can't get it to install. python version is 3.10 and matlab is R2023a.
Could you please tell me what to do?

Respuestas (1)

Rushikesh
Rushikesh el 20 de Sept. de 2024
The error you are encountering may be due to MATLAB R2023a not being in its default installation directory. To resolve this issue, you can add the MATLAB installation directory to the “LD_LIBRARY_PATH” environment variable on Linux systems. You can do this by adding the following line to your “.bashrc” file:
# in .bashrc
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<matlabroot>/bin/glnxa64
For macOS users, the environment variable name is DYLD_LIBRARY_PATH, and the path should be <matlabroot>/bin/maci64.
Additionally, installing the “matlabengine library via pip does not always guarantee a compatible version with MATLAB R2023a. It is recommended to download the MATLAB Engine version that is compatible with your MATLAB installation. Specifically, you can install MATLAB Engine version 9.14.7, which is known to be compatible with MATLAB R2023a, using the following command:
pip install matlabengine==9.14.7
For further guidance on identifying the compatible MATLAB Engine version for your installed MATLAB, as well as setting the LD_LIBRARY_PATH for your operating system, please refer to the documentation linked below. The perticular MATLAB Engine library release compatibility from 'Release history' section will provide additional details on appropriate version:
Hope this helps.

Categorías

Más información sobre Call MATLAB from Python en Help Center y File Exchange.

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by