필터 지우기
필터 지우기

Matlab 2023a python engine fails to start

조회 수: 14 (최근 30일)
Gustavo Silva
Gustavo Silva 2023년 9월 21일
답변: Gagan Agarwal 2023년 9월 25일
I've installed the python engine for Matlab2023a using the methods described in the documentation here
The installation messages claims success but, when I try to load the engine on a python terminal i get the following error:
Python 3.10.13 (main, Sep 11 2023, 13:44:35) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import matlab.engine
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/software/anaconda/2019.03/envs/gsilva/lib/python3.10/site-packages/matlab/__init__.py", line 218, in <module>
from matlabmultidimarrayforpython import double, single, uint8, int8, uint16, \
ImportError: /software/matlab/R2023a/extern/engines/python/../../../extern/bin/glnxa64/../../../sys/os/glnxa64/libstdc++.so.6: undefined symbol: __cxa_thread_atexit_impl
What should I do?

답변 (1개)

Gagan Agarwal
Gagan Agarwal 2023년 9월 25일
Hi Gustavo Silva,
I understand that you are trying to run the MATLAB engine directly from the Python terminal, but this is not possible. To use 'MATLAB engine' in Python, you need to create a Python script. Inside the script, you can import and start the 'MATLAB engine' using the following commands:
import matlab.engine
eng = matlab.engine.start_matlab()
You can execute the python script, by calling it from MATLAB using the 'pyrunfile' function.
For more information regarding 'pyrunfile', please refer to the following documentation: -
I hope this helps!

카테고리

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

태그

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by