Matlab engine install in conda environnement on M1 mac

9 ビュー (過去 30 日間)
Ariane
Ariane 2023 年 11 月 10 日
回答済み: Krishna 2023 年 11 月 24 日
I am trying to install the matlab engine for python in a conda environnement on my M1 mac (python 3.9, Matlab 2022b). I can install the matlab engine package but then run into the error "ModuleNotFoundError: No module named 'matlabmultidimarrayforpython'". I couldn't find a working solution online (https://uk.mathworks.com/matlabcentral/answers/1727740-matlab-engine-api-for-python-modulenotfounderror, https://uk.mathworks.com/matlabcentral/answers/1963859-matlabmultidimarrayforpython-error?s_tid=srchtitlehttps://stackoverflow.com/questions/46141631/running-matlab-using-python-gives-no-module-named-matlab-engine-error). Would anyone be able to help?

回答 (1 件)

Krishna
Krishna 2023 年 11 月 24 日
Hello Ariane,
It seems like you are encountering an issue with the installation of the MATLAB engine for Python in a Conda environment on your M1 Mac. To start the MATLAB engine with a python session, you must first install the engine API as a python package. Please go through this documentation to know in detail, how to install MATLAB engine API for python.
If you still get an error, you can check if the file “matlabmultidimarrayforpython.pyd” exists. You can check it here “MATLAB_INSTALL\extern\engines\python\dist\matlab\engine\win64.” If not try installing MATLAB again. Also, try installing pure python from python.org and try running the setup install again. Please go through this MATLAB answer link in detail because it describes the process well.
If the error still persists, please go through this article on how to troubleshoot MATLAB API for python installations.
Hope this helps.

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by