Configure Matlab to use Python without pyenv

I am trying to call Python from Matlab R2019a on a Windows 10 PC. I have Python 3.7 installed under Spyder 3, but Matlab cannot see it.
>> pyversion
version: ''
executable: ''
library: ''
home: ''
isloaded: 0
Because R2019a predates the pyenv() command, I am unable to follow the instructions here and here to resolve the problem. How can Matlab be configured to use Python without access to pyenv?

댓글 수: 3

Mario Malic
Mario Malic 2020년 9월 24일
편집: Mario Malic 2020년 9월 24일
pyversion supports input argument of path to exe file, so maybe that could work.
% PYVERSION(EXECUTABLE) specifies full path to Python executable. Use on
% any platform or for repackaged CPython implementation downloads.
Otherwise, try adding exe file on search path, that might be able to run it without input argument.
Matt J
Matt J 2020년 9월 25일
That did it. Thanks!
+1 had the same question yesterday but on a Mac :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기

질문:

2020년 9월 24일

댓글:

2020년 9월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by