MATLAB Answers

How do I chose the correct version of python when trying to install the Matlab Engine API?

71 ビュー (過去 30 日間)
Matthew Nikolai
Matthew Nikolai 2020 年 6 月 23 日
コメント済み: Matthew Nikolai 2020 年 6 月 24 日
I'm trying to install the Matlab Engine API for Windows. I have both Python 3.7 and 3.8, with 3.8 being my default version. When I try the command
python setup.py install
it gives me an error saying my version is 3.8, which isn't accepted. I then triend the command
python setup.py -3.7 install
but it gives the same error message. Any help would be appreciated.

  0 件のコメント

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

採用された回答

Kojiro Saito
Kojiro Saito 2020 年 6 月 24 日
As of R2020a, Python 3.8 is not supported yet. Your "python" command is an alias of Python 3.8, so you need to specify the full path of Python 3.7.
For example, if Python 3.7 is installed in C:\Program Files\Python 3.7,
"C:\Program Files\Python 3.7\python.exe" setup.py install
Double quotation is necessary if the installation folder contains spaces (like Program Files).
Please keep in mind that 64 bit versions of Python are necessary to user MATLAB Engine API of R2020a.

  2 件のコメント

Matthew Nikolai
Matthew Nikolai 2020 年 6 月 24 日
I tried
"C:\users\NIKOLMT\Anaconda3\python.exe" setup.py install
because the path for my 3.7 python is "c:\users\NIKOLMT\Anaconda3" and it doesn't work, saying that setup.py is not a valid command. Anything you can point out that I'm doing wrong?
Matthew Nikolai
Matthew Nikolai 2020 年 6 月 24 日
I actually got it to work without the quotes. Thank you for the help.

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by