フィルターのクリア

MATLAB can't call python module with import

2 ビュー (過去 30 日間)
Farshid Daryabor
Farshid Daryabor 2024 年 2 月 5 日
回答済み: Dinesh 2024 年 2 月 6 日
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');

回答 (1 件)

Dinesh
Dinesh 2024 年 2 月 6 日
Hi Farshid.
The following documentation link has all the troubleshooting steps to resolve this issue:
Hope this helps!

カテゴリ

Help Center および File ExchangeCall Python from MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by