matlabengine install error(python)

조회 수: 7 (최근 30일)
龍馬 青葉
龍馬 青葉 2023년 9월 11일
답변: Rushikesh 2024년 9월 20일
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?

답변 (1개)

Rushikesh
Rushikesh 2024년 9월 20일
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.

카테고리

Help CenterFile Exchange에서 Call MATLAB from Python에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by