Fatal Startup Error for python's MATLAB engine

15 ビュー (過去 30 日間)
Jingtao
Jingtao 2022 年 6 月 8 日
回答済み: Swasti 2025 年 7 月 10 日
I am trying to call MATLAB from python.
I have python 3.9.13 and matlab 9.11.0.1769968 (R2021b).
I installed the matlab engine for python by running the following commands in matlab:
cd (fullfile(matlabroot,'extern','engines','python'))
system('python setup.py install')
I then ran the python commands:
>>> import matlab.engine
>>> eng = matlab.engine.start_matlab()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "MY_USER_FOLDER\AppData\Local\Programs\Python\Python39\lib\site-packages\matlab\engine\__init__.py", line 130, in start_matlab
eng = future.result()
File "MY_USER_FOLDER\AppData\Local\Programs\Python\Python39\lib\site-packages\matlab\engine\futureresult.py", line 67, in result
return self.__future.result(timeout)
File "MY_USER_FOLDER\AppData\Local\Programs\Python\Python39\lib\site-packages\matlab\engine\matlabfuture.py", line 87, in result
handle = pythonengine.getMATLAB(self._future)
matlab.engine.EngineError: Unable to launch Simple server: Unable to launch C:\Program Files\MATLAB\R2021b\bin\win64\MATLAB.exe
because: Timed out reading transport byte from transport
And the matlab error:
Fatal Startup Error
Dynamic exception type: class
foundation::catapult::carrier::stream::TranspodException
std::exception::what: Unable to conned to parent because:
GetHandleInformation failed: 6

回答 (1 件)

Swasti
Swasti 2025 年 7 月 10 日
Try installing using the "python -m pip install ." command instead.
There is more information on the MATLAB Engine installation page here:

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by