MATLAB can't call python module with import
4 次查看(过去 30 天)
显示 更早的评论
I can import and open 'data.nc' through Jupyter Notebook,
import nctoolkit as nc
ds=nc.open_data("data.nc")
but when I am trying to import the corresponding module/package 'nctoolkit' through matlab, the bellow message will popped up,
>> py.nctoolkit.open_data("data.nc")
Unable to resolve the name py.nctoolkit.open_data.
I have checked current Python environment, and has already set it up for matlab. I appreciate if someone can solve the problem, Thanks!
>>pyenv
>>pyenv('Version', '~/.conda/envs/myenvs/bin/python');
0 个评论
回答(1 个)
Dinesh
2024-2-6
Hi Farshid.
The following documentation link has all the troubleshooting steps to resolve this issue:
Hope this helps!
0 个评论
另请参阅
类别
在 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!