How to call a python program from matlabr2019a

23 visualizaciones (últimos 30 días)
Saugata Bose
Saugata Bose el 16 de Sept. de 2019
Editada: Shrinidhi KR el 7 de Mayo de 2020
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,

Respuestas (2)

Nicolas B.
Nicolas B. el 16 de Sept. de 2019
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 el 7 de Mayo de 2020
Editada: Shrinidhi KR el 7 de Mayo de 2020
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.

Categorías

Más información sobre Call Python from MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by