matlabengine installation problem with the default install location of MATLAB

106 次查看(过去 30 天)
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.

请先登录,再进行评论。

回答(1 个)

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.

类别

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