- Clean the existing installation of MATLAB Engine.
- Re-installing the MATLAB Engine API for Python, you can refer the following documentation for it: https://www.mathworks.com/help/matlab/matlab_external/install-the-matlab-engine-for-python.html
Unable to run matlab code from python, I have Matlab2024a, python 3.11 and Macbook M1.
25 ビュー (過去 30 日間)
古いコメントを表示
After installing Matalab2024a locally on my Mac M1. I installed matlabengine 24.1.1 from https://pypi.org/project/matlabengine/ , I'm getting the following error. can you please give me a step by step instruction how can we resolve this, Thankyou
Traceback:
../../../miniconda3/envs/osipi/lib/python3.11/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
test1.py:2: in <module>
import matlab.engine
E ModuleNotFoundError: No module named 'matlab.engine'; 'matlab' is not a package
0 件のコメント
回答 (1 件)
Divyanshu
2024 年 4 月 1 日
編集済み: Divyanshu
2024 年 4 月 1 日
Hi Siddharth,
A possible reason for error "ModuleNotFoundError: No module named 'matlab.engine'; 'matlab' is not a package" can be because of incomplete or incorrect installation of MATLAB Engine API for Python.
You can try the following steps:
Moreover, please refer the following documentation for further details on how to call MATLAB from Python:
Hope it helps!
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Call MATLAB from Python についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!