Cannot start the MATLAB engine for python

5 次查看(过去 30 天)
Hello,
I am using Matlab R2018b on Ubuntu 16.04. I am also using PyCharm and python 3.5 I get however the following error when I try to start the MATLAB engine for python.
eng = matlab.engine.start_matlab()
matlab.engine.EngineError: Unable to launch MVM server: Unable to launch /.../bin/matlab
because: An error occurred while initializing child process: Failed to fork, while attempting to execute "/.../bin/matlab [here continues the very long command]" with Error : Cannot allocate memory
Can anyone help me and explain why I get this error?
Thank you

回答(1 个)

Harry Vancao
Harry Vancao 2018-11-8
编辑:Harry Vancao 2018-11-8
When you start a MATLAB engine, a new headless MATLAB process is started. The error means that the process was unable to be forked due to system resource limitations. More specifically, it appears that your machine does not have enough memory to launch MATLAB.
You can trouble-shoot this by running the command "top" on your terminal and monitor the memory availability of your machine when you are starting the MATLAB engine. Please ensure that at least 1GB of RAM is available before the engine is started.

类别

Help CenterFile Exchange 中查找有关 MATLAB Compiler SDK 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by