Install python matlab.engine in WSL

Is it possible to run the matlab engine API from WSL without installing matlab into WSL? I would like to be able to call matlab functions in python WSL to my windows matlab installation.
I have attempted to install the python engine by accessing the windows path /matlab/extern/engines/python/setup.py from within WSL, however I receive the following error: The installation of MATLAB is corrupted. Please reinstall MATLAB or contact Technical Support for assistance.
I assume this is because python is attempting to install the linux matlab python engine api from a windows matlab installation.
What is the easiest way to run matlab commands from python in WSL? Do I have to install matlab into WSL?

5 件のコメント

Sravan Kumar Kanchari Bavajigari
Sravan Kumar Kanchari Bavajigari 2022 年 9 月 15 日
Hi, I am trying to achieve the same. Did you figure out the solution? thanks
Joel Najmon
Joel Najmon 2022 年 9 月 16 日
I am also trying to figure out how to do this.
知宇
知宇 2023 年 7 月 5 日
I am also trying... Did anybody figure it out?
Hee Yeon KIM
Hee Yeon KIM 2023 年 11 月 20 日
Did anybody figure it out?
Matthew Russell
Matthew Russell 2023 年 12 月 4 日
As far as I can tell, yes, you need to first install matlab in WSL.
See here for a nice walkthrough, there are one or two unusual details along the way.
https://profile.tsaida.net/post/installing_matlab_to_wsl2/

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeStartup and Shutdown についてさらに検索

製品

リリース

R2022a

質問済み:

2022 年 9 月 13 日

コメント済み:

2023 年 12 月 4 日

Community Treasure Hunt

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

Start Hunting!

Translated by