Error 5001 when I use python multiprocessing module, which calls Matlab functions
11 ビュー (過去 30 日間)
古いコメントを表示
I used python multiprocessing module for multiprocessing a image processs function, in which I started a Matlab engine and call Matlab functions. Then it appeared many pop-ups: Error 5001 - Unable to access services required to run MATLAB.
I tried to start the Matlab engine in main function and passed the engine as parameters to the image function, but then it appeared TypeError: cannot pickle 'weakref.ReferenceType' object.
The rough code is as follows:
def ImageProcess(data):
eng = matlab.engine.start_matlab()
...
return results
if __name__ == '__main__':
pool = multiprocessing.Pool()
results = pool.map(ImageProcess, data)
pool.close()
pool.join()
0 件のコメント
回答 (1 件)
Esther
2024 年 3 月 28 日
This error indicates that the MATLAB has encountered a licensing issue. Try the solutions below to resolve the error:
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Call Python from MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!