unable to resolve the name py.function error
2 次查看(过去 30 天)
显示 更早的评论
Hello,
I am trying to call python in Matlab on Mac machine but i am not able to run any kind of (py.blabla) command, it says 'Unable to resolve the name py.myfunction'.
I used the command pyenv('Version' , 'Location of python') to load the python in Matlab.
And when i enter pyenv command the status says NotLoaded, please look at the screenshot in attachment.
kindly help me resolve the Issue.
Thanks & Regards,
Muneeb Fida
0 个评论
回答(1 个)
Al Danial
2022-5-19
Couple of things to try:
1) change the execution mode to InProcess
>> pyenv('ExecutionMode', 'InProcess')
2) open a terminal and verify that the Python installation you're pointing to works
$ /opt/miniconda3/bin/python
>>> print(3+4)
>>> exit()
Which version of matlab is this?
3 个评论
Al Danial
2022-5-21
I'm at a loss and have only one more suggestion: if practical, install a full Anaconda distribution instead of the minimal miniconda. That's what I have on my mac and it works well.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Call Python from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!