How to to deal error “Unable to launch MVM server: License Error: Error checking out license” when attemptting to call matlab function through python?

40 ビュー (過去 30 日間)
dylan
dylan 2019 年 7 月 21 日
回答済み: Lucas Bezerra 2023 年 5 月 15 日
When I run a python code which call some matlab function on linux server, the err message returns as follows:
Traceback (most recent call last):
File "LaplacianMatrixMatlabEngine.py", line 20, in <module>
engine = matlab.engine.start_matlab()
File "/home/task3/dylan/anaconda3/lib/python3.7/site-packages/matlab/engine/__init__.py", line 117, in start_matlab
eng = future.result()
File "/home/task3/dylan/anaconda3/lib/python3.7/site-packages/matlab/engine/futureresult.py", line 67, in result
return self.__future.result(timeout)
File "/home/task3/dylan/anaconda3/lib/python3.7/site-packages/matlab/engine/matlabfuture.py", line 87, in result
handle = pythonengine.getMATLAB(self._future)
matlab.engine.EngineError: Unable to launch MVM server: License Error: Error checking out license
so how can I deal this error to make my code work?
  5 件のコメント
dylan
dylan 2019 年 7 月 21 日
編集済み: dylan 2019 年 7 月 21 日
Sorry for the disturbing message, I am using python to call matlab function on a linux server, but it turns out that I can only rum my code through an IDE (ie. spyder3) on the login node, if I submit my task to the calculate node on server, the result will turn out the error showing above.
Eun Lee
Eun Lee 2020 年 6 月 24 日
I have a same issue, so what is the final solution here..?

サインインしてコメントする。

回答 (1 件)

Lucas Bezerra
Lucas Bezerra 2023 年 5 月 15 日
In my case I was using conda and I activated the Matlab license in the base environment, but not in the one I was actually using to run the matlab.engine. So I ran the activation script in the current environment directly:
bash /usr/local/matlab/bin/activate_matlab.sh
and it worked! This script requires a display though, so you should look for an alternative if you don't have one, e.g., you're running this on a cloud server with no RDP available.

カテゴリ

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

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by