matlabengine install error(python)
7 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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?
0 Commenti
Risposte (1)
Rushikesh
il 20 Set 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.
0 Commenti
Vedere anche
Categorie
Scopri di più su Call MATLAB from Python in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!