Install Matlab engine for Python on MacBook M1
Afficher commentaires plus anciens
Hello guys,
I tried to install Matlab engine for Python on Macbook M1.
But when I try to import matlab.engine, I met some errors.
Anyone know how to fix this error?
Thank you in advance.
import matlab.engine
ImportError:
dlopen(/Applications/MATLAB_R2022a.app/extern/engines/python/../../../extern/bin/maci64/matlabmultidimarrayforpython.cpython-39-darwin.so, 0x0002):
tried: '/Applications/MATLAB_R2022a.app/extern/engines/python/../../../extern/bin/maci64/matlabmultidimarrayforpython.cpython-39-darwin.so'
(mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')),
'/Applications/MATLAB_R2022a.app/extern/bin/maci64/matlabmultidimarrayforpython.cpython-39-darwin.so'
(mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))
4 commentaires
Walter Roberson
le 7 Juin 2022
Modifié(e) : Walter Roberson
le 7 Juin 2022
But are you using matlab under Rosetta or are you using the Open Beta of native implementation?
Hangyu LIU
le 7 Juin 2022
zhigang
le 29 Juin 2022
兄弟 你这句话I am using the open beta of native implementation. 是说你是在用原生适配m1的matlab软件还是在说python啊,我是rosseta2转译的matlab,在命令行执行arch -x86_64 python3报arch: posix_spawnp: python3: Bad CPU type in executable
Hangyu LIU
le 6 Juil 2022
Réponses (2)
Shivam Lahoti
le 3 Juil 2022
0 votes
You might be missing some steps in the process. you shall refer to this article and try again.
Steven Lord
le 3 Juil 2022
0 votes
If you are using the MATLAB R2022a Native Apple Silicon Platform Open Beta, one of the limitations listed on that page is "MATLAB Engine API for Python is not available."
Catégories
En savoir plus sur Call MATLAB from Python dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!