matlab.engine.EngineError: Unable to launch Simple server: Unable to launch /opt/matlab/R2020b/bin/matlab because: Timed out reading transport byte from transport
Mostra commenti meno recenti
I have an issue calling Matlab engine API from Python in Docker. This is my Matlab's docker containers.

When I tried to start matlab.engine from python, I got the error message below:

I have no issue using my license to start Matlab in the container.

Does anyone have any clue? Thank you for helping me.
Risposte (3)
Yongjian Feng
il 16 Lug 2021
0 voti
Did you do this already:
https://www.mathworks.com/help/matlab/matlab_external/install-the-matlab-engine-for-python.html
8 Commenti
Linwei Zhuo
il 16 Lug 2021
Yongjian Feng
il 17 Lug 2021
Some dependency not been created in the Docker image?
Linwei Zhuo
il 17 Lug 2021
Ivan Chebykin
il 30 Lug 2021
Did you find the way to fix this?
Daria Ri
il 3 Set 2021
Any updates on this? Having the exact same issue...
Huang Hejun
il 23 Gen 2022
Hi, I am still following this question. Is anything update of this question now? About the docker-matlab-python? Thanks.
Mikhail Lipkovich
il 26 Feb 2022
Hi, having the same issue. Was anyone able to resolve it?
Tiankai Hang
il 16 Mag 2022
Same problem ...
Ji
il 31 Mar 2023
I encounter a similar problem, and I solved the problem by openining Xming.
I install matlab on ubuntu-16.04 and using the vscode from windows(same LAN with ubuntu-16.04) to write code.
And I use Xming to transport image from Ubuntu to windows and I forget to open Xming therefore cause the problem.
my error message was similar as yours, like follows:
Traceback (most recent call last):
File "main.py", line 71, in <module>
model.fit(data)
File "/home/sirius/sata/lizhenShare/ISRec/models/model_1.py", line 90, in fit
eng = matlab.engine.start_matlab()
File "/home/sirius/anaconda3/lib/python3.8/site-packages/matlab/engine/__init__.py", line 140, in start_matlab
eng = future.result()
File "/home/sirius/anaconda3/lib/python3.8/site-packages/matlab/engine/futureresult.py", line 67, in result
return self.__future.result(timeout)
File "/home/sirius/anaconda3/lib/python3.8/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 /home/sirius/sata/matlab/bin/matlab
because: Timed out reading transport byte from transport
2 Commenti
Bha ki
il 11 Mag 2023
Hi, We are getting this error after running certain time so it's not network issue but after 2-3 hour network is getting closed ? Can you please help me out on this ?
Linwei Zhuo
il 15 Mag 2023
Hi, I got it fixed by using
Jakub Kilianczyk
il 29 Mag 2023
0 voti
Hi, I faced the same issue when I tried to use matlab in python in a container provided by matlab: https://hub.docker.com/r/mathworks/matlab
I tried to find some solutions in the <matlab-dir>/bin/ directory, mainly activate_matlab.sh file, but the license file would always be required.
Eventually I got it from the License Center following the instructions below:
It worked when I added "COPY license.lic license.lic" line to my Dockerfile and run the container with the
"-e MLM_LICENSE_FILE=license.lic" option.
Categorie
Scopri di più su Call MATLAB from Python in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
