matlabengine installation problem with the default install location of MATLAB

조회 수: 16 (최근 30일)
Steven
Steven 2023년 5월 30일
답변: Harsh 2025년 9월 5일
Hi,
I am trying to install the MATLAB engine for Python on my computer and when I try
pip install matlabengine==9.14.3
I get the following ERROR:
ERROR: Could not build wheels for matlabengine, which is required to install pyproject.toml-based projects
With RuntimeError:
MATLAB R2023a installation not found. Install to default location, or add <matlabroot>/bin/maca64 to DYLD_LIBRARY_PATH, where <matlabroot> is the root of a MATLAB R2023a installation.
However, I have checked my installation location of MATLAB, which is:
So I really don't know which part is going wrong in my situation and how to fix it.
  댓글 수: 1
Steven
Steven 2023년 5월 30일
I have tried to follow the official instruction but it's still not working. I believe the reason is maci64. It seems we can only use matlabengine on maca64.

댓글을 달려면 로그인하십시오.

답변 (2개)

Dinesh
Dinesh 2023년 6월 5일
Hi Steven!
It seems like the issue you're facing may be due to a version conflict between MATLAB and Python. To solve this, ensure that your Python version is between 3.8 and 3.10 since MATLAB R2023a supports the MATLAB engine for that range of Python versions only.
If the problem persists, try uninstalling the current packages and then install the MATLAB engine using the Python setup script. You can find information on how to download and install the MATLAB engine using the setup script in this MATLAB documentation.
It is also recommended to check the MATLAB documentation on version compatibility to ensure that everything is correctly set up.
  1. MATLAB version compatibility documentation
  2. Install MATLAB engine API (Application Programming Interface) using setup.py script.
  3. MATLAB Engine for Python 3.8 on MacBook Pro with M1 chip
I hope this helps!
Thank you.

Harsh
Harsh 2025년 9월 5일
I am trying to install MATLAB Engine in linux system,
i) Already downloaded MATLAB VERSION 2025a
ii) cd user/home/matlab_2025a_linux/extern/engines/python
iii) sudo python3 setup.py install
doing these steps matlabengine is already install with version 25.1 but system is unable to find out the MATLAB Library showing error like First issue: libmx.so: cannot open shared object file: No such file or directory
Second issue: libmx.so: cannot open shared object file: No such file or directory
for this i am adding enviroment variable export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/hred/matlab_2025a_Linux/bin/glnxa64. but showing same error as above mention

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by