How to call a python program from matlabr2019a

조회 수: 23 (최근 30일)
Saugata Bose
Saugata Bose 2019년 9월 16일
편집: Shrinidhi KR 2020년 5월 7일
Hi
I am trying to implement vader sentiment scores. In my earlier thread, Walter Roberson has provided me a python implementation link. As far as I understand, I need to connect to the python program from my matlab. But I have no clue from where to begin. Besides, when did I execute this from my matlab it shows error.
>> pyenv('Version','version')
Undefined function or variable 'pyenv'.
I have python 3.7.4 installed(64 bit) and I already added the path in the matlab as well. Would you please guide me how to resolve the issue and how to connect to the python function.
thanks,

답변 (2개)

Nicolas B.
Nicolas B. 2019년 9월 16일
Hey Saugata,
you should follow this guide from mathworks: Undefined variable "py" or function "py.command"
It helps you to ensure you have installed and configured Python correctly.
Regards

Shrinidhi KR
Shrinidhi KR 2020년 5월 7일
편집: Shrinidhi KR 2020년 5월 7일
pyenv function is introduced in R2019b version. Hence you are getting the error in R2019a version as:
>> pyenv('Version','version')
Undefined function or variable 'pyenv'.
You can use pyversion function for the same in R2019a version. This should return you the details regarding python version and interpreter.

카테고리

Help CenterFile Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by